From 7d6d11f8d8a6c39d8077fe80937e5c000d1f832c Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 20 Feb 2026 01:21:51 +0100 Subject: [PATCH] Fix EditorSettings error due to `android_sdk_path` when exporting a project This editor setting is queried once every 3 seconds, as it is used to check whether devices have been (dis)connected for one-click deploy. This method may be called early on depending on initialization order, which has led to occasional error messages when exporting a project. The method now returns early if EditorSettings isn't ready yet (it will be called again soon after anyway). --- platform/android/export/export_plugin.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index d327af2076..77cb48d9d1 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -292,6 +292,12 @@ static const int DEFAULT_TARGET_SDK_VERSION = 36; // Should match the value in ' #ifndef ANDROID_ENABLED void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) { + if (!EditorSettings::get_singleton()) { + // Some methods called here query editor settings, so we need it to be ready first. + // If it's not ready yet, just wait for the next iteration. + return; + } + EditorExportPlatformAndroid *ea = static_cast(ud); while (!ea->quit_request.is_set()) {