aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-25 17:59:49 +0000
committerFilippos Karapetis2010-06-25 17:59:49 +0000
commit784f52a677aed3877b47371f6bbcb3e3ffa97393 (patch)
treeceb87041fbdc60a8878f34d8da23cccec30e65f7 /engines
parent69694f361977d8ae1908957e5fb9d4ad242bbf98 (diff)
downloadscummvm-rg350-784f52a677aed3877b47371f6bbcb3e3ffa97393.tar.gz
scummvm-rg350-784f52a677aed3877b47371f6bbcb3e3ffa97393.tar.bz2
scummvm-rg350-784f52a677aed3877b47371f6bbcb3e3ffa97393.zip
Removed the getHunkPointer error - it's valid SCI behavior (e.g. when loading/quitting sometimes, since hunks are not saved). We check for valid hunk pointers anyway, so there's no reason for the warning/error
svn-id: r50279
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/seg_manager.cpp2
-rw-r--r--engines/sci/graphics/paint16.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index d356c9a3fc..3740e53339 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -454,7 +454,7 @@ byte *SegManager::getHunkPointer(reg_t addr) {
HunkTable *ht = (HunkTable *)getSegment(addr.segment, SEG_TYPE_HUNK);
if (!ht || !ht->isValidEntry(addr.offset)) {
- error("getHunkPointer() with invalid handle %04x:%04x", PRINT_REG(addr));
+ // Valid SCI behavior, e.g. when loading/quitting
return NULL;
}
diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp
index c5b97ad216..88fa467b3a 100644
--- a/engines/sci/graphics/paint16.cpp
+++ b/engines/sci/graphics/paint16.cpp
@@ -330,7 +330,8 @@ reg_t GfxPaint16::bitsSave(const Common::Rect &rect, byte screenMask) {
memoryId = _segMan->allocateHunkEntry("SaveBits()", size);
memoryPtr = _segMan->getHunkPointer(memoryId);
- _screen->bitsSave(workerRect, screenMask, memoryPtr);
+ if (memoryPtr)
+ _screen->bitsSave(workerRect, screenMask, memoryPtr);
return memoryId;
}