Delete menu later to prevent segfault
This commit is contained in:
parent
267cbd7dad
commit
daa2d42ef2
|
@ -29,8 +29,8 @@ void SyncthingMenuAction::handleConnectedChanged()
|
||||||
{
|
{
|
||||||
// update the current menu
|
// update the current menu
|
||||||
if (QMenu *const menu = this->menu()) {
|
if (QMenu *const menu = this->menu()) {
|
||||||
|
menu->deleteLater();
|
||||||
setMenu(nullptr);
|
setMenu(nullptr);
|
||||||
delete menu;
|
|
||||||
}
|
}
|
||||||
createMenu(SyncthingFileItemAction::createActions(m_properties, parentWidget()));
|
createMenu(SyncthingFileItemAction::createActions(m_properties, parentWidget()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue