From cd9f0225a1f7c29ba9ec3eb6a3e3be69e16fc5a8 Mon Sep 17 00:00:00 2001 From: player-03 Date: Fri, 21 Oct 2022 19:39:30 -0400 Subject: [PATCH] Fix null pointer error in `IOSPlatform`. --- tools/platforms/IOSPlatform.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/platforms/IOSPlatform.hx b/tools/platforms/IOSPlatform.hx index 1f748546a..065e4d48d 100644 --- a/tools/platforms/IOSPlatform.hx +++ b/tools/platforms/IOSPlatform.hx @@ -734,7 +734,8 @@ class IOSPlatform extends PlatformTarget #if (lime && lime_cffi && !macro) Log.info("", " - \x1b[1mGenerating image:\x1b[0m " + imagePath); - var image = new Image(null, 0, 0, size.w, size.h, (0xFF << 24) | (project.window.background & 0xFFFFFF)); + var background = project.window.background != null ? project.window.background & 0xFFFFFF : 0x000000; + var image = new Image(null, 0, 0, size.w, size.h, (0xFF << 24) | background); var bytes = image.encode(PNG); File.saveBytes(imagePath, bytes);