mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-25 02:04:23 +00:00
PopupMenu: Avoid potential crash when accessing exitingModalState member
This commit is contained in:
parent
4805b86ca4
commit
319da1608d
1 changed files with 7 additions and 3 deletions
|
|
@ -509,10 +509,14 @@ struct MenuWindow : public Component
|
|||
auto resultID = options.hasWatchedComponentBeenDeleted() ? 0 : getResultItemID (item);
|
||||
|
||||
exitModalState (resultID);
|
||||
exitingModalState = true;
|
||||
|
||||
if (makeInvisible && deletionChecker != nullptr)
|
||||
setVisible (false);
|
||||
if (deletionChecker != nullptr)
|
||||
{
|
||||
exitingModalState = true;
|
||||
|
||||
if (makeInvisible)
|
||||
setVisible (false);
|
||||
}
|
||||
|
||||
if (resultID != 0
|
||||
&& item != nullptr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue