From: Mikko Rasa Date: Sun, 16 Jun 2019 10:14:55 +0000 (+0300) Subject: Check the result of open_raw X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=2c097a6afe55d7be2e52cee75403b09043057b0d;p=libs%2Fgl.git Check the result of open_raw --- diff --git a/source/texture.cpp b/source/texture.cpp index 719d4a56..9d76e062 100644 --- a/source/texture.cpp +++ b/source/texture.cpp @@ -423,6 +423,8 @@ void Texture::Loader::external_image(const string &fn) { Graphics::Image img; RefPtr io = get_collection().open_raw(fn); + if(!io) + throw IO::file_not_found(fn); img.load_io(*io); obj.image(img, srgb);