aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorAlexander Tkachev2016-08-06 16:20:44 +0600
committerAlexander Tkachev2016-08-06 16:20:44 +0600
commit139ad46410fe0a92a83eabd662caf2165eb498da (patch)
tree813c2d5b78e4bff19610fa7fcc20695872d087e3 /graphics
parentf5db38a0015039bc082e63f6cda926d316d363ac (diff)
downloadscummvm-rg350-139ad46410fe0a92a83eabd662caf2165eb498da.tar.gz
scummvm-rg350-139ad46410fe0a92a83eabd662caf2165eb498da.tar.bz2
scummvm-rg350-139ad46410fe0a92a83eabd662caf2165eb498da.zip
WAGE: Fix crash in Explorer
Caused by operator[] usage on empty string.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/macgui/macmenu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp
index 6169b3e3cd..a78fa2e6ce 100644
--- a/graphics/macgui/macmenu.cpp
+++ b/graphics/macgui/macmenu.cpp
@@ -249,7 +249,7 @@ void Menu::createSubMenuFromString(int id, const char *str) {
Common::String tmpitem(item);
tmpitem.trim();
- if (tmpitem[0] == '(') {
+ if (tmpitem.size() > 0 && tmpitem[0] == '(') {
enabled = false;
for (uint j = 0; j < item.size(); j++)