aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorEugene Sandulenko2016-06-05 14:30:12 +0200
committerEugene Sandulenko2016-06-05 23:10:20 +0200
commit786780ccb905277445b5d17d47fdc6669005bfb8 (patch)
treeeef1dd49ef89fa22a6abf848a633280ce57bed30 /gui
parent61235e7f551f72495d1c0848998fd8698a2a788d (diff)
downloadscummvm-rg350-786780ccb905277445b5d17d47fdc6669005bfb8.tar.gz
scummvm-rg350-786780ccb905277445b5d17d47fdc6669005bfb8.tar.bz2
scummvm-rg350-786780ccb905277445b5d17d47fdc6669005bfb8.zip
GUI: Prevent potential negative index access
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeEngine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 262b2d7b5a..f093846bec 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -865,7 +865,7 @@ void ThemeEngine::queueDD(DrawData type, const Common::Rect &r, uint32 dynamic,
void ThemeEngine::queueDDText(TextData type, TextColor color, const Common::Rect &r, const Common::String &text, bool restoreBg,
bool ellipsis, Graphics::TextAlign alignH, TextAlignVertical alignV, int deltax, const Common::Rect &drawableTextArea) {
- if (_texts[type] == 0)
+ if (type != kTextDataNone && _texts[type] == 0)
return;
Common::Rect area = r;