aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Marti2008-10-18 00:29:23 +0000
committerVicent Marti2008-10-18 00:29:23 +0000
commit3644910f0d7d0ccf09b9453e8a9d8898c668b870 (patch)
treed729ecb56dc3ddba5264168621d6c30d9ed28b8f
parent36311eefb44a43221665bf6d5d11a4d6fd9f330f (diff)
downloadscummvm-rg350-3644910f0d7d0ccf09b9453e8a9d8898c668b870.tar.gz
scummvm-rg350-3644910f0d7d0ccf09b9453e8a9d8898c668b870.tar.bz2
scummvm-rg350-3644910f0d7d0ccf09b9453e8a9d8898c668b870.zip
Fixed: "GUI: Crash in Debugger" (ID: 2169419)
svn-id: r34814
-rw-r--r--gui/ThemeEngine.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 82eba7d1df..f26d35ba58 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -899,10 +899,13 @@ void ThemeEngine::drawText(const Common::Rect &r, const Common::String &str, Wid
void ThemeEngine::drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, WidgetStateInfo state) {
if (!ready())
return;
+
+ Common::Rect charArea = r;
+ charArea.clip(_screen->w, _screen->h);
- restoreBackground(r);
- font->drawChar(_screen, ch, r.left, r.top, 0);
- addDirtyRect(r);
+ restoreBackground(charArea);
+ font->drawChar(_screen, ch, charArea.left, charArea.top, 0);
+ addDirtyRect(charArea);
}
void ThemeEngine::debugWidgetPosition(const char *name, const Common::Rect &r) {