diff options
| author | 2016-04-21 13:29:23 -0400 | |
|---|---|---|
| committer | 2016-04-21 13:29:23 -0400 | |
| commit | 232bcc04c94bdf7e9bf16ae27b609730626e70cb (patch) | |
| tree | c6dc07d16d024fd5c7722f0bcd3e67866fc631e3 /src/modules/popupeditor/PopupEditorWindow.cpp | |
| parent | ClassEditorWindow: fix legalese on boilerplate (diff) | |
| download | KVIrc-232bcc04c94bdf7e9bf16ae27b609730626e70cb.tar.gz KVIrc-232bcc04c94bdf7e9bf16ae27b609730626e70cb.tar.bz2 KVIrc-232bcc04c94bdf7e9bf16ae27b609730626e70cb.zip | |
PopupEditorWindow: Fix crash in context removal
Diffstat (limited to 'src/modules/popupeditor/PopupEditorWindow.cpp')
| -rw-r--r-- | src/modules/popupeditor/PopupEditorWindow.cpp | 6 |
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); } } |
