]> git.tdb.fi Git - libs/gl.git/commitdiff
Check the result of open_raw
authorMikko Rasa <tdb@tdb.fi>
Sun, 16 Jun 2019 10:14:55 +0000 (13:14 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 16 Jun 2019 10:14:55 +0000 (13:14 +0300)
source/texture.cpp

index 719d4a56ac029218cbd176ac076644865fc20c72..9d76e0626bff7818015bfbdc0b6e7d0b2244c2f0 100644 (file)
@@ -423,6 +423,8 @@ void Texture::Loader::external_image(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.image(img, srgb);