From 879e494840574d4b22a4658d67cdd1f6dc8d0b55 Mon Sep 17 00:00:00 2001 From: Minzkraut Date: Sat, 5 Aug 2023 13:25:19 +0200 Subject: [PATCH] Fix loading of fallback image in exported builds --- RemoteLoader.gd | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/RemoteLoader.gd b/RemoteLoader.gd index 391bae4..7ea0a58 100644 --- a/RemoteLoader.gd +++ b/RemoteLoader.gd @@ -30,7 +30,8 @@ func GetRemoteImage(url): error = image.load_jpg_from_buffer(res[3]) if error != OK: print("Error fetching image ", str(error)) - image.load("res://assets/fallback_card.png") - image.save_png(outFile) - print("Saved new image to cache. " + outFile) + image = load("res://assets/fallback_card.png") + else: + image.save_png(outFile) + print("Saved new image to cache. " + outFile) return image