Skip to content

Commit

Permalink
Fixed|libappfw: Potential crash during shutdown
Browse files Browse the repository at this point in the history
SubmenuAction may double-delete its popup in the situation where the
popup is open during shutdown.
  • Loading branch information
skyjake committed May 8, 2016
1 parent ffdfd09 commit 5a51533
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doomsday/sdk/libappfw/src/widgets/menuwidget.cpp
Expand Up @@ -120,7 +120,7 @@ DENG2_PIMPL(MenuWidget)
SubmenuAction(MenuWidget::Instance *inst, ui::SubmenuItem const &parentItem)
: SubAction(inst, parentItem)
{
_sub = new PopupMenuWidget;
_sub.reset(new PopupMenuWidget);
setWidget(_sub, parentItem.openingDirection());

// Use the items from the submenu.
Expand All @@ -133,7 +133,7 @@ DENG2_PIMPL(MenuWidget)
}

private:
PopupMenuWidget *_sub; // owned
SafeWidgetPtr<PopupMenuWidget> _sub; // owned
};

/**
Expand Down

0 comments on commit 5a51533

Please sign in to comment.