aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/popupeditor
diff options
context:
space:
mode:
authorGravatar staticfox2016-04-21 13:29:23 -0400
committerGravatar staticfox2016-04-21 13:29:23 -0400
commit232bcc04c94bdf7e9bf16ae27b609730626e70cb (patch)
treec6dc07d16d024fd5c7722f0bcd3e67866fc631e3 /src/modules/popupeditor
parentClassEditorWindow: fix legalese on boilerplate (diff)
downloadKVIrc-232bcc04c94bdf7e9bf16ae27b609730626e70cb.tar.gz
KVIrc-232bcc04c94bdf7e9bf16ae27b609730626e70cb.tar.bz2
KVIrc-232bcc04c94bdf7e9bf16ae27b609730626e70cb.zip
PopupEditorWindow: Fix crash in context removal
Diffstat (limited to 'src/modules/popupeditor')
-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);
}
}