浏览代码

Merge pull request #87208 from brno32/android-export-error-icon

Add clearer error message for missing project icon during Android export
Rémi Verschelde 1 年之前
父节点
当前提交
429f22ddcc
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      platform/android/export/export_plugin.cpp

+ 5 - 1
platform/android/export/export_plugin.cpp

@@ -1605,7 +1605,11 @@ void EditorExportPlatformAndroid::load_icon_refs(const Ref<EditorExportPreset> &
 	print_verbose("Loading regular icon from " + path);
 	print_verbose("Loading regular icon from " + path);
 	if (path.is_empty() || ImageLoader::load_image(path, icon) != OK) {
 	if (path.is_empty() || ImageLoader::load_image(path, icon) != OK) {
 		print_verbose("- falling back to project icon: " + project_icon_path);
 		print_verbose("- falling back to project icon: " + project_icon_path);
-		ImageLoader::load_image(project_icon_path, icon);
+		if (!project_icon_path.is_empty()) {
+			ImageLoader::load_image(project_icon_path, icon);
+		} else {
+			ERR_PRINT("No project icon specified. Please specify one in the Project Settings under Application -> Config -> Icon");
+		}
 	}
 	}
 
 
 	// Adaptive foreground: user selection -> regular icon (user selection -> project icon -> default).
 	// Adaptive foreground: user selection -> regular icon (user selection -> project icon -> default).