mirror of
https://github.com/minetest/irrlicht.git
synced 2024-12-24 17:50:31 +01:00
Avoid access allocation when CGUIContextMenu::setSubMenu receives a nullptr for menu.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6162 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
4cb289fc91
commit
ba8de14e83
@ -136,10 +136,10 @@ void CGUIContextMenu::setSubMenu(u32 index, CGUIContextMenu* menu)
|
||||
Items[index].SubMenu->drop();
|
||||
|
||||
Items[index].SubMenu = menu;
|
||||
menu->setVisible(false);
|
||||
|
||||
if (Items[index].SubMenu)
|
||||
if (menu)
|
||||
{
|
||||
menu->setVisible(false);
|
||||
menu->AllowFocus = false;
|
||||
if ( Environment->getFocus() == menu )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user