summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2020-02-17 11:08:30 +1000
committerLorn Potter <lorn.potter@gmail.com>2020-02-20 08:32:53 +1000
commitd928beb024c240b37d35d2c53f25648c99a484b4 (patch)
tree4ca5939c3f2fcbd62cffe582d3a385593a3a3145 /src/plugins/platforms/wasm
parent8c3cc07bf5254cb91b37a0000191871e9e32014e (diff)
wasm: do not try to resume main thread if mainloop has not started yet
Fixes: QTBUG-81520 Change-Id: Ibd891629d1d023e47d196dd60821cc5c583a178d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm')
-rw-r--r--src/plugins/platforms/wasm/qwasmeventdispatcher.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
index ca8db9b215..09acd37abc 100644
--- a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
+++ b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
@@ -194,6 +194,7 @@ void QWasmEventDispatcher::wakeUp()
{
#ifdef EMSCRIPTEN_HAS_ASYNC_RUN_IN_MAIN_RUNTIME_THREAD
if (!emscripten_is_main_runtime_thread())
+ if (m_hasMainLoop)
emscripten_async_run_in_main_runtime_thread_(EM_FUNC_SIG_VI, (void*)(&QWasmEventDispatcher::mainThreadWakeUp), this);
#endif
QEventDispatcherUNIX::wakeUp();