summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolsplugin.cpp
diff options
context:
space:
mode:
authorIvan Donchevskii <ivan.donchevskii@qt.io>2018-11-09 09:27:06 +0100
committerIvan Donchevskii <ivan.donchevskii@qt.io>2018-11-12 08:09:00 +0000
commit868c8e31d5302d1f8728fbc9d7e2282b137ef7f8 (patch)
treec1952a1afbfc8f8f22ec8b0cb092a91675231e8b /src/plugins/cpptools/cpptoolsplugin.cpp
parent910724f963ee195203b17a89700f686590ef04cc (diff)
downloadqt-creator-868c8e31d5302d1f8728fbc9d7e2282b137ef7f8.tar.gz
ClangFormat: Fix crash on exit
Was introduced in 0e5c7f51fa with the page being deleted to remove it from the global list of pages. Change-Id: Ia13f7ab74d85b5b8c66f1b20e33d97c29ce3e8f1 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp')
-rw-r--r--src/plugins/cpptools/cpptoolsplugin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp
index 02e695e534..a844c6bb30 100644
--- a/src/plugins/cpptools/cpptoolsplugin.cpp
+++ b/src/plugins/cpptools/cpptoolsplugin.cpp
@@ -95,14 +95,15 @@ public:
StringTable::destroy();
delete m_cppFileSettingsPage;
delete m_cppCodeModelSettingsPage;
- delete m_cppCodeStyleSettingsPage;
+ if (m_cppCodeStyleSettingsPage)
+ delete m_cppCodeStyleSettingsPage;
}
QSharedPointer<CppCodeModelSettings> m_codeModelSettings;
CppToolsSettings *m_settings = nullptr;
CppFileSettingsPage *m_cppFileSettingsPage = nullptr;
CppCodeModelSettingsPage *m_cppCodeModelSettingsPage = nullptr;
- CppCodeStyleSettingsPage *m_cppCodeStyleSettingsPage = nullptr;
+ QPointer<CppCodeStyleSettingsPage> m_cppCodeStyleSettingsPage = nullptr;
};
CppToolsPlugin::CppToolsPlugin()