aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/popupeditor/PopupEditorWindow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/popupeditor/PopupEditorWindow.cpp b/src/modules/popupeditor/PopupEditorWindow.cpp
index 5f20c64df..feedfddac 100644
--- a/src/modules/popupeditor/PopupEditorWindow.cpp
+++ b/src/modules/popupeditor/PopupEditorWindow.cpp
@@ -1254,9 +1254,11 @@ void PopupEditorWidget::removeCurrentPopup()
{
if(m_pLastEditedItem)
{
- delete m_pLastEditedItem;
+ MenuTreeWidgetItem * it = m_pLastEditedItem;
m_pLastEditedItem = nullptr;
- currentItemChanged(0,0);
+ delete it;
+ if(!m_pLastEditedItem)
+ currentItemChanged(0,0);
}
}