Fix crash in wxMenu::MSWCommand if item is NULL
This commit is contained in:
committed by
Václav Slavík
parent
54ef52fbd9
commit
66e07d6465
@@ -793,9 +793,13 @@ bool wxMenu::MSWCommand(WXUINT WXUNUSED(param), WXWORD id_)
|
||||
UINT menuState = ::GetMenuState(GetHmenu(), id_, MF_BYCOMMAND);
|
||||
checked = (menuState & MF_CHECKED) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
item->GetMenu()->SendEvent(id, checked);
|
||||
item->GetMenu()->SendEvent(id, checked);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendEvent(id, checked);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user