[Scummvm-cvs-logs] SF.net SVN: scummvm:[49294] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri May 28 18:47:30 CEST 2010


Revision: 49294
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49294&view=rev
Author:   thebluegr
Date:     2010-05-28 16:47:30 +0000 (Fri, 28 May 2010)

Log Message:
-----------
Silenced some superfluous warnings in KQ5CD

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kmisc.cpp
    scummvm/trunk/engines/sci/graphics/paint16.cpp

Modified: scummvm/trunk/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-05-28 12:37:54 UTC (rev 49293)
+++ scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-05-28 16:47:30 UTC (rev 49294)
@@ -252,10 +252,15 @@
 		break;
 	}
 	case K_MEMORY_PEEK : {
+		if (!argv[1].segment) {
+			// This occurs in KQ5CD when interacting with certain objects
+			warning("Attempt to peek invalid memory at %04x:%04x", PRINT_REG(argv[1]));
+			return s->r_acc;
+		}
+
 		SegmentRef ref = s->_segMan->dereference(argv[1]);
 
 		if (!ref.isValid() || ref.maxSize < 2) {
-			// This occurs in KQ5CD when interacting with certain objects
 			warning("Attempt to peek invalid memory at %04x:%04x", PRINT_REG(argv[1]));
 			return s->r_acc;
 		}

Modified: scummvm/trunk/engines/sci/graphics/paint16.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint16.cpp	2010-05-28 12:37:54 UTC (rev 49293)
+++ scummvm/trunk/engines/sci/graphics/paint16.cpp	2010-05-28 16:47:30 UTC (rev 49294)
@@ -354,7 +354,8 @@
 }
 
 void GfxPaint16::bitsFree(reg_t memoryHandle) {
-	_segMan->freeHunkEntry(memoryHandle);
+	if (!memoryHandle.isNull())	// happens in KQ5CD
+		_segMan->freeHunkEntry(memoryHandle);
 }
 
 void GfxPaint16::kernelDrawPicture(GuiResourceId pictureId, int16 animationNr, bool animationBlackoutFlag, bool mirroredFlag, bool addToFlag, int16 EGApaletteNo) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list