]> git.tdb.fi Git - libs/gl.git/commitdiff
Throw an exception if a referenced external image is not found
authorMikko Rasa <tdb@tdb.fi>
Sun, 10 Sep 2017 12:31:30 +0000 (15:31 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 10 Sep 2017 12:31:30 +0000 (15:31 +0300)
source/texture2darray.cpp

index 4123f0e2906e261b64fe0227c27894a00f8c7a09..1a085ed8e73bbe6c89c5361b7839a5fe32180c32 100644 (file)
@@ -64,6 +64,8 @@ void Texture2DArray::Loader::external_image(unsigned z, const string &fn)
 {
        Graphics::Image img;
        RefPtr<IO::Seekable> io = get_collection().open_raw(fn);
+       if(!io)
+               throw IO::file_not_found(fn);
        img.load_io(*io);
 
        obj.layer_image(0, z, img);