diff --git a/fileitemactionplugin/syncthingmenuaction.cpp b/fileitemactionplugin/syncthingmenuaction.cpp index f9e4ce4..0fd0cca 100644 --- a/fileitemactionplugin/syncthingmenuaction.cpp +++ b/fileitemactionplugin/syncthingmenuaction.cpp @@ -29,8 +29,8 @@ void SyncthingMenuAction::handleConnectedChanged() { // update the current menu if (QMenu *const menu = this->menu()) { + menu->deleteLater(); setMenu(nullptr); - delete menu; } createMenu(SyncthingFileItemAction::createActions(m_properties, parentWidget()));