From 966f7cb5dddfe87f23701c12eeb071bd798a9e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 7 Oct 2021 13:37:24 +0200 Subject: [PATCH] wasm: make timers work for the new event dispatcher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t exit from the timer callback if there is no main thread event dispatcher, since it could be that the main thread event dispatcher is of the old event dispatcher type. Pick-to: 6.2 Change-Id: Ibb7a34a99e2001b52d2a985022f5baa7cd2152bf Reviewed-by: Lorn Potter --- src/corelib/kernel/qeventdispatcher_wasm.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/corelib/kernel/qeventdispatcher_wasm.cpp b/src/corelib/kernel/qeventdispatcher_wasm.cpp index a6384d251e..15ada58aad 100644 --- a/src/corelib/kernel/qeventdispatcher_wasm.cpp +++ b/src/corelib/kernel/qeventdispatcher_wasm.cpp @@ -526,9 +526,6 @@ void QEventDispatcherWasm::callProcessTimers(void *context) { Q_ASSERT(emscripten_is_main_runtime_thread()); - // Bail out if Qt has been shut down - if (!g_mainThreadEventDispatcher) - return; // Note: "context" may be a stale pointer here, // take care before casting and dereferencing!