summaryrefslogtreecommitdiff
path: root/plugingui/image.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/image.cc')
-rw-r--r--plugingui/image.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugingui/image.cc b/plugingui/image.cc
index fc28d11..4b5622e 100644
--- a/plugingui/image.cc
+++ b/plugingui/image.cc
@@ -48,6 +48,11 @@ Image::Image(const std::string& filename)
: filename(filename)
{
Resource rc(filename);
+ if(!rc.valid())
+ {
+ setError();
+ return;
+ }
load(rc.data(), rc.size());
}