From b4748ad8ba6800a3ccb8728433d3e702957ff849 Mon Sep 17 00:00:00 2001 From: mothbeanie Date: Mon, 7 Nov 2022 18:04:32 -0800 Subject: [PATCH] image loading null check --- desktop_version/src/GraphicsResources.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/GraphicsResources.cpp b/desktop_version/src/GraphicsResources.cpp index 710d3b01f0..3f77882c6b 100644 --- a/desktop_version/src/GraphicsResources.cpp +++ b/desktop_version/src/GraphicsResources.cpp @@ -107,7 +107,10 @@ void GraphicsResources::init(void) char buffer[64]; SDL_snprintf(buffer, sizeof(buffer), "graphics/region%i.png", i); SDL_Surface* temp = LoadImage(buffer); - graphics.customminimaps[i] = temp; + if (temp != NULL) + { + graphics.customminimaps[i] = temp; + } } }