aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/he/wiz_he.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index 798f703db6..e364105e5a 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -1548,12 +1548,16 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int
if (rScreen.intersects(clip)) {
rScreen.clip(clip);
} else {
+ free(dst);
+
return 0;
}
} else if (_rectOverrideEnabled) {
if (rScreen.intersects(_rectOverride)) {
rScreen.clip(_rectOverride);
} else {
+ free(dst);
+
return 0;
}
}