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>
This commit is contained in:
parent
6e0591437a
commit
c034089fa6
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user