[Scummvm-cvs-logs] SF.net SVN: scummvm:[48098] scummvm/trunk/engines/sci/graphics/compare.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Feb 21 01:50:27 CET 2010


Revision: 48098
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48098&view=rev
Author:   thebluegr
Date:     2010-02-21 00:50:27 +0000 (Sun, 21 Feb 2010)

Log Message:
-----------
Handle invalid rects in kCanBeHere(). Fixes some odd crashes in Iceman

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/compare.cpp

Modified: scummvm/trunk/engines/sci/graphics/compare.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/compare.cpp	2010-02-20 23:30:59 UTC (rev 48097)
+++ scummvm/trunk/engines/sci/graphics/compare.cpp	2010-02-21 00:50:27 UTC (rev 48098)
@@ -152,6 +152,9 @@
 	checkRect.right = GET_SEL32V(_segMan, curObject, SELECTOR(brRight));
 	checkRect.bottom = GET_SEL32V(_segMan, curObject, SELECTOR(brBottom));
 
+	if (!checkRect.isValidRect())	// can occur in Iceman
+		return false;
+
 	adjustedRect = _coordAdjuster->onControl(checkRect);
 
 	signal = GET_SEL32V(_segMan, curObject, SELECTOR(signal));


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