diff options
-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) |