From 2c097a6afe55d7be2e52cee75403b09043057b0d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 16 Jun 2019 13:14:55 +0300 Subject: [PATCH] Check the result of open_raw --- source/texture.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.43.0