From 786780ccb905277445b5d17d47fdc6669005bfb8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 5 Jun 2016 14:30:12 +0200 Subject: GUI: Prevent potential negative index access --- gui/ThemeEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui') 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; -- cgit v1.2.3