diff options
-rw-r--r-- | platform/web/export/export_plugin.cpp | 4 | ||||
-rw-r--r-- | platform/web/export/export_plugin.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/platform/web/export/export_plugin.cpp b/platform/web/export/export_plugin.cpp index d7e72612b4..e2967ee8b8 100644 --- a/platform/web/export/export_plugin.cpp +++ b/platform/web/export/export_plugin.cpp @@ -676,7 +676,7 @@ Ref<Texture2D> EditorExportPlatformWeb::get_run_icon() const { void EditorExportPlatformWeb::_server_thread_poll(void *data) { EditorExportPlatformWeb *ej = static_cast<EditorExportPlatformWeb *>(data); - while (!ej->server_quit) { + while (!ej->server_quit.get()) { OS::get_singleton()->delay_usec(6900); { MutexLock lock(ej->server_lock); @@ -714,7 +714,7 @@ EditorExportPlatformWeb::~EditorExportPlatformWeb() { if (server.is_valid()) { server->stop(); } - server_quit = true; + server_quit.set(true); if (server_thread.is_started()) { server_thread.wait_to_finish(); } diff --git a/platform/web/export/export_plugin.h b/platform/web/export/export_plugin.h index 98e3fe729e..c73d6d6794 100644 --- a/platform/web/export/export_plugin.h +++ b/platform/web/export/export_plugin.h @@ -52,7 +52,7 @@ class EditorExportPlatformWeb : public EditorExportPlatform { int menu_options = 0; Ref<EditorHTTPServer> server; - bool server_quit = false; + SafeNumeric<bool> server_quit; Mutex server_lock; Thread server_thread; |