Fix potential startup crashes

Change-Id: Id0f03b4fa9ff6a8f0f5b0de11fe51c3729065140
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Maurice Kalinowski
2016-12-02 09:50:14 +01:00
committed by Tobias Hunger
parent e2eb591c4c
commit de9c2d3bf0
2 changed files with 10 additions and 8 deletions

View File

@@ -106,6 +106,7 @@ void Find::destroy()
{ {
delete m_instance; delete m_instance;
m_instance = 0; m_instance = 0;
if (d) {
delete d->m_currentDocumentFind; delete d->m_currentDocumentFind;
delete d->m_findToolBar; delete d->m_findToolBar;
delete d->m_findDialog; delete d->m_findDialog;
@@ -113,6 +114,7 @@ void Find::destroy()
delete d->m_searchResultWindow; delete d->m_searchResultWindow;
delete d; delete d;
} }
}
Find *Find::instance() Find *Find::instance()
{ {

View File

@@ -331,11 +331,11 @@ public:
QAction *m_projectSelectorActionQuick; QAction *m_projectSelectorActionQuick;
QAction *m_runSubProject; QAction *m_runSubProject;
ProjectWindow *m_proWindow; ProjectWindow *m_proWindow = nullptr;
QString m_sessionToRestoreAtStartup; QString m_sessionToRestoreAtStartup;
QStringList m_profileMimeTypes; QStringList m_profileMimeTypes;
AppOutputPane *m_outputPane; AppOutputPane *m_outputPane = nullptr;
QList<QPair<QString, QString> > m_recentProjects; // pair of filename, displayname QList<QPair<QString, QString> > m_recentProjects; // pair of filename, displayname
static const int m_maxRecentProjects = 25; static const int m_maxRecentProjects = 25;