]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameInitDispose.cpp
Trying to handle a bit better missing files and avoid segfaults
[lugaru.git] / Source / GameInitDispose.cpp
index 4a700b37567b6f4ebf4b72be76ab394bb8bdf137..fcd17982cbab94c7565ee092217c8f9dbc271a57 100644 (file)
@@ -146,7 +146,10 @@ void LoadSave(const char *fileName, GLuint *textureid, bool mipmap, GLubyte *arr
 
     //Load Image
     ImageRec texture;
-    load_image(Folders::getResourcePath(fileName).c_str(), texture);
+    if (!load_image(Folders::getResourcePath(fileName).c_str(), texture)) {
+        texdetail = temptexdetail;
+        return;
+    }
     texdetail = temptexdetail;
 
     int bytesPerPixel = texture.bpp / 8;