[Scummvm-cvs-logs] SF.net SVN: scummvm: [23249] scummvm/tags/release-0-9-0/gui
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Wed Jun 21 23:41:04 CEST 2006
Revision: 23249
Author: lordhoto
Date: 2006-06-21 14:40:58 -0700 (Wed, 21 Jun 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=23249&view=rev
Log Message:
-----------
Commits fix for crashing about dialog mentioned my Marucs on -devel.
Modified Paths:
--------------
scummvm/tags/release-0-9-0/gui/ThemeClassic.cpp
scummvm/tags/release-0-9-0/gui/ThemeNew.cpp
Modified: scummvm/tags/release-0-9-0/gui/ThemeClassic.cpp
===================================================================
--- scummvm/tags/release-0-9-0/gui/ThemeClassic.cpp 2006-06-21 21:35:40 UTC (rev 23248)
+++ scummvm/tags/release-0-9-0/gui/ThemeClassic.cpp 2006-06-21 21:40:58 UTC (rev 23249)
@@ -166,6 +166,9 @@
if (!_initOk)
return;
+ if (r.top < 0 || r.bottom - _font->getFontHeight() >= _screen.h)
+ return;
+
if (!inverted) {
restoreBackground(r);
_font->drawString(&_screen, str, r.left, r.top, r.width(), getColor(state), convertAligment(align), deltax, useEllipsis);
Modified: scummvm/tags/release-0-9-0/gui/ThemeNew.cpp
===================================================================
--- scummvm/tags/release-0-9-0/gui/ThemeNew.cpp 2006-06-21 21:35:40 UTC (rev 23248)
+++ scummvm/tags/release-0-9-0/gui/ThemeNew.cpp 2006-06-21 21:40:58 UTC (rev 23249)
@@ -303,6 +303,10 @@
void ThemeNew::drawText(const Common::Rect &r, const Common::String &str, State state, TextAlign align, bool inverted, int deltax, bool useEllipsis, FontStyle font) {
if (!_initOk)
return;
+
+ if (r.top < 0 || r.bottom - getFontHeight(font) >= _screen.h)
+ return;
+
Common::Rect r2(r.left, r.top, r.right, r.top+getFontHeight(font));
uint32 color;
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