Fix loading of fallback image in exported builds

This commit is contained in:
2023-08-05 13:25:19 +02:00
parent dfbbea1903
commit 879e494840

View File

@@ -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