diff options
author | Lorn Potter <lorn.potter@gmail.com> | 2020-02-17 11:08:30 +1000 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2020-04-14 19:37:03 +0000 |
commit | c034089fa697e6dc22f04b3209768a9dc1abcb9c (patch) | |
tree | f679bc0f079934fa2c7bc548f9a28efd1ed1e8c6 /src/plugins | |
parent | 6e0591437a3174aa1d0a20f71e429126a3958c4f (diff) |
wasm: do not try to resume main thread if mainloop has not started yet
(cherry picked from commit d928beb024c240b37d35d2c53f25648c99a484b4)
Fixes: QTBUG-83293
Change-Id: Ibd891629d1d023e47d196dd60821cc5c583a178d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmeventdispatcher.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp index ca8db9b215..2e1b083557 100644 --- a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp +++ b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp @@ -194,7 +194,8 @@ void QWasmEventDispatcher::wakeUp() { #ifdef EMSCRIPTEN_HAS_ASYNC_RUN_IN_MAIN_RUNTIME_THREAD if (!emscripten_is_main_runtime_thread()) - emscripten_async_run_in_main_runtime_thread_(EM_FUNC_SIG_VI, (void*)(&QWasmEventDispatcher::mainThreadWakeUp), this); + if (m_hasMainLoop) + emscripten_async_run_in_main_runtime_thread_(EM_FUNC_SIG_VI, (void*)(&QWasmEventDispatcher::mainThreadWakeUp), this); #endif QEventDispatcherUNIX::wakeUp(); } |