[Scummvm-cvs-logs] SF.net SVN: scummvm:[39451] scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Mar 16 20:19:59 CET 2009


Revision: 39451
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39451&view=rev
Author:   thebluegr
Date:     2009-03-16 19:19:59 +0000 (Mon, 16 Mar 2009)

Log Message:
-----------
It seems that the SCI GUI code tries to show rectangles with negative height. Added some sanity checks for this, but the *real* problem lies elsewhere

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp

Modified: scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-03-16 17:25:13 UTC (rev 39450)
+++ scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-03-16 19:19:59 UTC (rev 39451)
@@ -491,6 +491,12 @@
 
 	oprim = (gfxw_primitive_t *) other;
 
+	// FIXME: I'm not even sure why this happens...
+	if (wprim->bounds.height < 0 || oprim->bounds.height < 0) {
+		warning("_gfxwop_primitive_equals: height < 0");
+		return 0;
+	}
+
 	if (!toCommonRect(wprim->bounds).equals(toCommonRect(oprim->bounds)))
 		return 0;
 
@@ -1970,6 +1976,11 @@
 	if (!GFXW_IS_CONTAINER(widget) && widget->parent) {
 		bounds.x += widget->parent->bounds.x;
 		bounds.y += widget->parent->bounds.y;
+		// FIXME: I'm not even sure why this happens...
+		if (bounds.height < 0) {
+			warning("gfxw_widget_matches_snapshot: height < 0");
+			return 0;
+		}
 	}
 
 	return ((widget->serial >= free_above_eq || widget->serial < free_below) && 


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