Skip to content

Commit 4219ce9

Browse files
authored
Merge pull request godotengine#110485 from bruvzg/aemb_dtr
Fix iOS/visionOS export plugin crash on exit.
2 parents cb7cd81 + 906aff5 commit 4219ce9

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

editor/export/editor_export_platform_apple_embedded.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2799,10 +2799,4 @@ void EditorExportPlatformAppleEmbedded::_initialize(const char *p_platform_logo_
27992799
}
28002800

28012801
EditorExportPlatformAppleEmbedded::~EditorExportPlatformAppleEmbedded() {
2802-
#ifdef MACOS_ENABLED
2803-
quit_request.set();
2804-
if (check_for_changes_thread.is_started()) {
2805-
check_for_changes_thread.wait_to_finish();
2806-
}
2807-
#endif
28082802
}

editor/export/editor_export_platform_apple_embedded.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ class EditorExportPlatformAppleEmbedded : public EditorExportPlatform {
9898
check_for_changes_thread.start(_check_for_changes_poll_thread, this);
9999
}
100100

101+
void _stop_remote_device_poller_thread() {
102+
quit_request.set();
103+
if (check_for_changes_thread.is_started()) {
104+
check_for_changes_thread.wait_to_finish();
105+
}
106+
}
107+
101108
int _execute(const String &p_path, const List<String> &p_arguments, std::function<void(const String &)> p_on_data);
102109

103110
private:

platform/ios/export/export_plugin.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ void EditorExportPlatformIOS::initialize() {
4747
}
4848

4949
EditorExportPlatformIOS::~EditorExportPlatformIOS() {
50+
#ifdef MACOS_ENABLED
51+
_stop_remote_device_poller_thread();
52+
#endif
5053
}
5154

5255
void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options) const {

platform/visionos/export/export_plugin.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ void EditorExportPlatformVisionOS::initialize() {
4747
}
4848

4949
EditorExportPlatformVisionOS::~EditorExportPlatformVisionOS() {
50+
#ifdef MACOS_ENABLED
51+
_stop_remote_device_poller_thread();
52+
#endif
5053
}
5154

5255
void EditorExportPlatformVisionOS::get_export_options(List<ExportOption> *r_options) const {

0 commit comments

Comments
 (0)