[Scummvm-cvs-logs] SF.net SVN: scummvm:[50641] scummvm/trunk/gui/widget.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sun Jul 4 03:18:50 CEST 2010
Revision: 50641
http://scummvm.svn.sourceforge.net/scummvm/?rev=50641&view=rev
Author: lordhoto
Date: 2010-07-04 01:18:49 +0000 (Sun, 04 Jul 2010)
Log Message:
-----------
Prevent GraphicsWidget from being assigned a surface which wouldn't fit in the widget.
Modified Paths:
--------------
scummvm/trunk/gui/widget.cpp
Modified: scummvm/trunk/gui/widget.cpp
===================================================================
--- scummvm/trunk/gui/widget.cpp 2010-07-04 01:11:37 UTC (rev 50640)
+++ scummvm/trunk/gui/widget.cpp 2010-07-04 01:18:49 UTC (rev 50641)
@@ -583,6 +583,11 @@
if (!gfx || !gfx->pixels)
return;
+ if (gfx->w > _w || gfx->h > _h) {
+ warning("GraphicsWidget has size %dx%d, but a surface with %dx%d is to be set", _w, _h, gfx->w, gfx->h);
+ return;
+ }
+
// TODO: add conversion to OverlayColor
_gfx.copyFrom(*gfx);
}
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