mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-26 00:19:13 +00:00
Add some checks to Menu::closeAll() to avoid accessing null pointers
These are not reproducible situations, but we've received a crash report that indicates that these pointers can be null if some unknown scenario.
This commit is contained in:
parent
c674c474f6
commit
182a094f2b
@ -1125,7 +1125,15 @@ void Menu::closeAll()
|
||||
}
|
||||
|
||||
MenuBox* base_menubox = get_base_menubox(menu->getParent());
|
||||
ASSERT(base_menubox);
|
||||
if (!base_menubox)
|
||||
return;
|
||||
|
||||
MenuBaseData* base = base_menubox->getBase();
|
||||
ASSERT(base);
|
||||
if (!base)
|
||||
return;
|
||||
|
||||
base->close_all = true;
|
||||
base->was_clicked = false;
|
||||
if (base->is_filtering) {
|
||||
|
Loading…
Reference in New Issue
Block a user