diff options
author | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2015-07-06 14:33:03 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2015-07-06 15:20:20 +0000 |
commit | 7527d66ce6910185ad3232727be333d4f59d1832 (patch) | |
tree | d2b74ee9908f91875970861eeeb7bd31a47d8c6e /src/plugins/coreplugin/editormanager | |
parent | 90500b0225bde1dfd33f4888314adaae28a8b267 (diff) | |
download | qt-creator-7527d66ce6910185ad3232727be333d4f59d1832.tar.gz |
Editor: Set pointer to 0 after delete
That pointer is used later in the method, so make sure we do not
mess something up.
Change-Id: I9162803bd86b0cc3c1d28a7265245f6d43efeb6a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/coreplugin/editormanager')
-rw-r--r-- | src/plugins/coreplugin/editormanager/editormanager.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 27ec33a833..60c51bbc5a 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -664,6 +664,7 @@ IEditor *EditorManagerPrivate::openEditor(EditorView *view, const QString &fileN overrideCursor.reset(); delete editor; + editor = 0; if (openResult == IDocument::OpenResult::ReadError) { QMessageBox msgbox(QMessageBox::Critical, EditorManager::tr("File Error"), |