[Scummvm-cvs-logs] SF.net SVN: scummvm: [21422] scummvm/trunk/gui/newgui.cpp
sev at users.sourceforge.net
sev at users.sourceforge.net
Thu Mar 23 17:46:13 CET 2006
Revision: 21422
Author: sev
Date: 2006-03-23 17:45:03 -0800 (Thu, 23 Mar 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21422&view=rev
Log Message:
-----------
Check values loaded from theme INI and give meaningful errors instead of
bad crashes on blitting stage.
Modified Paths:
--------------
scummvm/trunk/gui/newgui.cpp
Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp 2006-03-24 01:26:25 UTC (rev 21421)
+++ scummvm/trunk/gui/newgui.cpp 2006-03-24 01:45:03 UTC (rev 21422)
@@ -65,6 +65,19 @@
_w = g_gui.evaluator()->getVar(name + ".w");
_h = g_gui.evaluator()->getVar(name + ".h");
+ if(_x < 0)
+ error("Widget <%s> has x < 0", name.c_str());
+ if(_x >= g_system->getOverlayWidth())
+ error("Widget <%s> has x > %d", name.c_str(), g_system->getOverlayWidth());
+ if(_x + _w >= g_system->getOverlayWidth())
+ error("Widget <%s> has x + w > %d", name.c_str(), g_system->getOverlayWidth());
+ if(_y < 0)
+ error("Widget <%s> has y < 0", name.c_str());
+ if(_y >= g_system->getOverlayWidth())
+ error("Widget <%s> has y > %d", name.c_str(), g_system->getOverlayHeight());
+ if(_y + _h >= g_system->getOverlayWidth())
+ error("Widget <%s> has y + h > %d", name.c_str(), g_system->getOverlayHeight());
+
_name = name;
}
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