From 9c63ab99f0a505b0f60079bb30cc453b4415fddc Mon Sep 17 00:00:00 2001 From: Hein-Pieter van Braam Date: Fri, 1 Sep 2017 22:33:39 +0200 Subject: Fix use of unitialized variables The second in my quest to make Godot 3.x compile with -Werror on GCC7 --- platform/uwp/export/export.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'platform/uwp/export/export.cpp') diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp index f9b8422004..a2be126c58 100644 --- a/platform/uwp/export/export.cpp +++ b/platform/uwp/export/export.cpp @@ -866,7 +866,7 @@ class EditorExportUWP : public EditorExportPlatform { Vector _get_image_data(const Ref &p_preset, const String &p_path) { Vector data; - StreamTexture *image; + StreamTexture *image = NULL; if (p_path.find("StoreLogo") != -1) { image = p_preset->get("images/store_logo").is_zero() ? NULL : Object::cast_to(((Object *)p_preset->get("images/store_logo"))); @@ -882,6 +882,8 @@ class EditorExportUWP : public EditorExportPlatform { image = p_preset->get("images/wide310x150_logo").is_zero() ? NULL : Object::cast_to(((Object *)p_preset->get("images/wide310x150_logo"))); } else if (p_path.find("SplashScreen") != -1) { image = p_preset->get("images/splash_screen").is_zero() ? NULL : Object::cast_to(((Object *)p_preset->get("images/splash_screen"))); + } else { + ERR_PRINT("Unable to load logo"); } if (!image) return data; -- cgit v1.2.3