aboutsummaryrefslogtreecommitdiff
path: root/engines/made/screen.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2014-07-11 23:32:44 -0400
committerMatthew Hoops2014-07-11 23:32:44 -0400
commit9b282326aa0b358ab9f962578bfaa58bce20c925 (patch)
tree09fb796f007f2fab23b34841b584cae3bef63a31 /engines/made/screen.cpp
parent3ddf04465eb8a7d1e6ad6ade374bc30eecdd72c0 (diff)
downloadscummvm-rg350-9b282326aa0b358ab9f962578bfaa58bce20c925.tar.gz
scummvm-rg350-9b282326aa0b358ab9f962578bfaa58bce20c925.tar.bz2
scummvm-rg350-9b282326aa0b358ab9f962578bfaa58bce20c925.zip
MADE: Error out when a picture cannot be found
Diffstat (limited to 'engines/made/screen.cpp')
-rw-r--r--engines/made/screen.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp
index c27b781dda..edccb68953 100644
--- a/engines/made/screen.cpp
+++ b/engines/made/screen.cpp
@@ -368,6 +368,9 @@ uint16 Screen::drawFlex(uint16 flexIndex, int16 x, int16 y, int16 flipX, int16 f
return 0;
PictureResource *flex = _vm->_res->getPicture(flexIndex);
+ if (!flex)
+ error("Failed to find picture %d", flexIndex);
+
Graphics::Surface *sourceSurface = flex->getPicture();
drawSurface(sourceSurface, x, y, flipX, flipY, mask, clipInfo);