Skip to content

Commit

Permalink
wasm: do not try to resume main thread if mainloop has not started yet
Browse files Browse the repository at this point in the history
(cherry picked from commit d928beb)
Fixes: QTBUG-83293
Change-Id: Ibd891629d1d023e47d196dd60821cc5c583a178d
Reviewed-by: Morten Johan Sørvig <[email protected]>
  • Loading branch information
lpotter authored and Morten Johan Sørvig committed Apr 14, 2020
1 parent 6e05914 commit c034089
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit c034089

Please sign in to comment.