diff options
author | Eugene Sandulenko | 2013-04-29 23:16:08 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-04-29 23:16:55 +0300 |
commit | b1893bc5f7929aa363a46f17bf2312fe053cb6ae (patch) | |
tree | ab1cbb7a0ecc4d5a5c309dd7cef5eebcf2719376 /engines | |
parent | c7aceeb08e14ffa8d07c1cdf202172fe86079e5f (diff) | |
download | scummvm-rg350-b1893bc5f7929aa363a46f17bf2312fe053cb6ae.tar.gz scummvm-rg350-b1893bc5f7929aa363a46f17bf2312fe053cb6ae.tar.bz2 scummvm-rg350-b1893bc5f7929aa363a46f17bf2312fe053cb6ae.zip |
SCUMM HE: fix crash introduced in a10ad272a84
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/he/wiz_he.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index e364105e5a..ca360803bd 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -1548,7 +1548,8 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int if (rScreen.intersects(clip)) { rScreen.clip(clip); } else { - free(dst); + if (flags & kWIFBlitToMemBuffer) + free(dst); return 0; } @@ -1556,7 +1557,8 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int if (rScreen.intersects(_rectOverride)) { rScreen.clip(_rectOverride); } else { - free(dst); + if (flags & kWIFBlitToMemBuffer) + free(dst); return 0; } |