Fix crash introduced in 701170d85e1bd7dfb495de4685bd160bdd992307

This commit is contained in:
David Capello 2016-11-24 19:59:34 -03:00
parent 74248cf33c
commit 60d89b10ed

View File

@ -486,8 +486,8 @@ bool MenuBox::onProcessMessage(Message* msg)
msg->modifiers() == kKeyAltModifier)) || msg->modifiers() == kKeyAltModifier)) ||
((this->type() == kMenuBarWidget) && (msg->modifiers() == kKeyAltModifier))) { ((this->type() == kMenuBarWidget) && (msg->modifiers() == kKeyAltModifier))) {
auto keymsg = static_cast<KeyMessage*>(msg); auto keymsg = static_cast<KeyMessage*>(msg);
selected = check_for_letter(menu, keymsg);
if (check_for_letter(menu, keymsg)) { if (selected) {
menu->highlightItem(selected, true, true, true); menu->highlightItem(selected, true, true, true);
return true; return true;
} }