From e1e7bc3e7720525cf05eb78704d5ad606cfec164 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 10 Sep 2017 15:31:30 +0300 Subject: [PATCH] Throw an exception if a referenced external image is not found --- source/texture2darray.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.43.0