Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions obs-browser-plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -904,8 +904,14 @@ bool obs_module_load(void)
qRegisterMetaType<MessageTask>("MessageTask");
#endif

os_event_init(&cef_started_event, OS_EVENT_TYPE_MANUAL);
os_event_init(&cef_initialized_event, OS_EVENT_TYPE_MANUAL);
if (os_event_init(&cef_started_event, OS_EVENT_TYPE_MANUAL) != 0 ||
os_event_init(&cef_initialized_event, OS_EVENT_TYPE_MANUAL) != 0) {
blog(LOG_ERROR, "[obs-browser]: Failed to create CEF startup events");
os_event_destroy(cef_started_event);
cef_started_event = nullptr;
cef_initialized_event = nullptr;
return false;
}

#if defined(_WIN32) && CHROME_VERSION_BUILD < 5615
/* CefEnableHighDPISupport doesn't do anything on OS other than Windows. Would also crash macOS at this point as CEF is not directly linked */
Expand Down
5 changes: 4 additions & 1 deletion obs-browser-source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ void BrowserSource::ExecuteOnBrowser(BrowserFunc func, bool async)
}
#endif
os_event_t *finishedEvent;
os_event_init(&finishedEvent, OS_EVENT_TYPE_AUTO);
if (os_event_init(&finishedEvent, OS_EVENT_TYPE_AUTO) != 0) {
blog(LOG_ERROR, "[obs-browser]: Failed to create browser task event");
return;
}
bool success = QueueCEFTask([&]() {
if (!!cefBrowser) {
func(cefBrowser);
Expand Down
Loading