Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf84e9f8

Browse files
authored
[Mac] throw js exception if iosurface fails to be created (#1567)
* [Mac] throw js exception if iosurface fails to be created* frontend already checks for an exception during surface creation. It iscleaner for us to throw in this case since this is basically a fatal error.Prevents the possibility of an undefined value being passed into node-window-rendering etc
1 parent7f518ad commitf84e9f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎obs-studio-client/source/nodeobs_display.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,10 @@ Napi::Value display::OBS_content_createIOSurface(const Napi::CallbackInfo &info)
335335

336336
std::vector<ipc::value> response = conn->call_synchronous_helper("Display","OBS_content_createIOSurface", {ipc::value(key)});
337337

338-
if (!ValidateResponse(info, response))
338+
if (!ValidateResponse(info, response)) {
339+
Napi::Error::New(info.Env(), response[1].value_str).ThrowAsJavaScriptException();
339340
return info.Env().Undefined();
341+
}
340342

341343
returnNapi::Number::New(info.Env(), response[1].value_union.ui32);
342344
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp