WAGE: Do not crash on empty submenus

This commit is contained in:
Eugene Sandulenko 2016-01-12 19:41:52 +01:00
parent 91ef3e6dcd
commit 506748c82f

View File

@ -266,6 +266,9 @@ void Menu::render() {
void Menu::renderSubmenu(MenuItem *menu) {
Common::Rect *r = &menu->subbbox;
if (r->width() == 0 || r->height() == 0)
return;
Design::drawFilledRect(&_gui->_screen, *r, kColorWhite, _patterns, 1);
Design::drawRect(&_gui->_screen, *r, 1, kColorBlack, _patterns, 1);