From ec4be1a4e764e53bb81519055c0d5483152eeca7 Mon Sep 17 00:00:00 2001 From: Hoshino Lina Date: Tue, 14 Apr 2026 18:29:58 +0900 Subject: [PATCH] Do not try to create the browser before init CEF is initialized in a browser manager thread on Windows and Linux, which happens asynchronously. The graphics tick function may be called before CEF initialization completes, which leads to asserts and other issues. Ensure this does not happen by checking for CEF init completion. --- obs-browser-source.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/obs-browser-source.cpp b/obs-browser-source.cpp index 6e80fbce8..a91679893 100644 --- a/obs-browser-source.cpp +++ b/obs-browser-source.cpp @@ -43,6 +43,7 @@ using namespace std; +extern os_event_t *cef_started_event; extern bool QueueCEFTask(std::function task); static mutex browser_list_mutex; @@ -549,6 +550,9 @@ void BrowserSource::Update(obs_data_t *settings) void BrowserSource::Tick() { + if (os_event_try(cef_started_event) != 0) + return; + if (create_browser && CreateBrowser()) create_browser = false; #if defined(ENABLE_BROWSER_SHARED_TEXTURE)