diff options
author | Filippos Karapetis | 2011-10-19 21:54:05 +0300 |
---|---|---|
committer | Filippos Karapetis | 2011-10-19 21:54:05 +0300 |
commit | 28d0901bffcf6c00e5c4ed81666f86c08f495ec1 (patch) | |
tree | 448e97d562af6f4daf9fd25ba7559c6fa4b1eb7d /engines/sci/graphics/text32.cpp | |
parent | 513d0be10628574c98bb2588a7ef4567590228e2 (diff) | |
download | scummvm-rg350-28d0901bffcf6c00e5c4ed81666f86c08f495ec1.tar.gz scummvm-rg350-28d0901bffcf6c00e5c4ed81666f86c08f495ec1.tar.bz2 scummvm-rg350-28d0901bffcf6c00e5c4ed81666f86c08f495ec1.zip |
SCI: Added a sanity check when drawing text. Older SCI32 saves work now
Diffstat (limited to 'engines/sci/graphics/text32.cpp')
-rw-r--r-- | engines/sci/graphics/text32.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp index c7c9332313..4890262d94 100644 --- a/engines/sci/graphics/text32.cpp +++ b/engines/sci/graphics/text32.cpp @@ -116,6 +116,11 @@ void GfxText32::disposeTextBitmap(reg_t hunkId) { void GfxText32::drawTextBitmap(reg_t textObject) { reg_t hunkId = readSelector(_segMan, textObject, SELECTOR(bitmap)); + // Sanity check: Check if the hunk is set. If not, either the game scripts + // didn't set it, or an old saved game has been loaded, where it wasn't set. + if (hunkId.isNull()) + return; + byte *memoryPtr = _segMan->getHunkPointer(hunkId); if (!memoryPtr) |