]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture.cpp
Check the result of open_raw
[libs/gl.git] / 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);
 {
        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);
        img.load_io(*io);
 
        obj.image(img, srgb);