diff --git a/editor/export/editor_export_platform_apple_embedded.cpp b/editor/export/editor_export_platform_apple_embedded.cpp index 6fe16eac842..ec4480082f5 100644 --- a/editor/export/editor_export_platform_apple_embedded.cpp +++ b/editor/export/editor_export_platform_apple_embedded.cpp @@ -2799,10 +2799,4 @@ void EditorExportPlatformAppleEmbedded::_initialize(const char *p_platform_logo_ } EditorExportPlatformAppleEmbedded::~EditorExportPlatformAppleEmbedded() { -#ifdef MACOS_ENABLED - quit_request.set(); - if (check_for_changes_thread.is_started()) { - check_for_changes_thread.wait_to_finish(); - } -#endif } diff --git a/editor/export/editor_export_platform_apple_embedded.h b/editor/export/editor_export_platform_apple_embedded.h index 6e6f6cd02d0..5acc80b8fc9 100644 --- a/editor/export/editor_export_platform_apple_embedded.h +++ b/editor/export/editor_export_platform_apple_embedded.h @@ -98,6 +98,13 @@ protected: check_for_changes_thread.start(_check_for_changes_poll_thread, this); } + void _stop_remote_device_poller_thread() { + quit_request.set(); + if (check_for_changes_thread.is_started()) { + check_for_changes_thread.wait_to_finish(); + } + } + int _execute(const String &p_path, const List &p_arguments, std::function p_on_data); private: diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp index 56e4ae10b3e..7db946d6af4 100644 --- a/platform/ios/export/export_plugin.cpp +++ b/platform/ios/export/export_plugin.cpp @@ -47,6 +47,9 @@ void EditorExportPlatformIOS::initialize() { } EditorExportPlatformIOS::~EditorExportPlatformIOS() { +#ifdef MACOS_ENABLED + _stop_remote_device_poller_thread(); +#endif } void EditorExportPlatformIOS::get_export_options(List *r_options) const { diff --git a/platform/visionos/export/export_plugin.cpp b/platform/visionos/export/export_plugin.cpp index 8f48814fdce..cdf90283ed0 100644 --- a/platform/visionos/export/export_plugin.cpp +++ b/platform/visionos/export/export_plugin.cpp @@ -47,6 +47,9 @@ void EditorExportPlatformVisionOS::initialize() { } EditorExportPlatformVisionOS::~EditorExportPlatformVisionOS() { +#ifdef MACOS_ENABLED + _stop_remote_device_poller_thread(); +#endif } void EditorExportPlatformVisionOS::get_export_options(List *r_options) const {