From: Mikko Rasa Date: Sun, 10 Sep 2017 12:31:30 +0000 (+0300) Subject: Throw an exception if a referenced external image is not found X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e1e7bc3e7720525cf05eb78704d5ad606cfec164;p=libs%2Fgl.git Throw an exception if a referenced external image is not found --- diff --git a/source/texture2darray.cpp b/source/texture2darray.cpp index 4123f0e2..1a085ed8 100644 --- a/source/texture2darray.cpp +++ b/source/texture2darray.cpp @@ -64,6 +64,8 @@ void Texture2DArray::Loader::external_image(unsigned z, 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.layer_image(0, z, img);