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).
This commit is contained in:
Hugo Locurcio 2026-02-20 01:21:51 +01:00
parent 897172fa25
commit 7d6d11f8d8
No known key found for this signature in database
GPG key ID: 46ACE49F61685096

View file

@ -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<EditorExportPlatformAndroid *>(ud);
while (!ea->quit_request.is_set()) {