diff options
-rw-r--r-- | src/plugins/coreplugin/find/findplugin.cpp | 14 | ||||
-rw-r--r-- | src/plugins/projectexplorer/projectexplorer.cpp | 4 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/plugins/coreplugin/find/findplugin.cpp b/src/plugins/coreplugin/find/findplugin.cpp index 0b3eb6962b..7fa23ddebd 100644 --- a/src/plugins/coreplugin/find/findplugin.cpp +++ b/src/plugins/coreplugin/find/findplugin.cpp @@ -106,12 +106,14 @@ void Find::destroy() { delete m_instance; m_instance = 0; - delete d->m_currentDocumentFind; - delete d->m_findToolBar; - delete d->m_findDialog; - ExtensionSystem::PluginManager::removeObject(d->m_searchResultWindow); - delete d->m_searchResultWindow; - delete d; + if (d) { + delete d->m_currentDocumentFind; + delete d->m_findToolBar; + delete d->m_findDialog; + ExtensionSystem::PluginManager::removeObject(d->m_searchResultWindow); + delete d->m_searchResultWindow; + delete d; + } } Find *Find::instance() diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index fb4f32c01d..ac67ba9ea3 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -331,11 +331,11 @@ public: QAction *m_projectSelectorActionQuick; QAction *m_runSubProject; - ProjectWindow *m_proWindow; + ProjectWindow *m_proWindow = nullptr; QString m_sessionToRestoreAtStartup; QStringList m_profileMimeTypes; - AppOutputPane *m_outputPane; + AppOutputPane *m_outputPane = nullptr; QList<QPair<QString, QString> > m_recentProjects; // pair of filename, displayname static const int m_maxRecentProjects = 25; |