X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FTexture.cpp;h=3106c8f31ac4490ff265e24b8faeb1d2b37fe3d4;hb=e08372a2095837a0b951ccb68c3499ef67c1a827;hp=7fb4b94609740f7ba55e8ad4ac2119ea7f981f54;hpb=757fd9c1ec8d263225df90ef486051712f448483;p=lugaru.git diff --git a/Source/Texture.cpp b/Source/Texture.cpp index 7fb4b94..3106c8f 100644 --- a/Source/Texture.cpp +++ b/Source/Texture.cpp @@ -34,7 +34,10 @@ void TextureRes::load() ImageRec texture; //load image into 'texture' - load_image(filename.c_str(), texture); + if (!load_image(filename.c_str(), texture)) { + cerr << "Texture " << filename << " loading failed" << endl; + return; + } skinsize = texture.sizeX; GLuint type = GL_RGBA;