diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-07-12 08:52:32 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2011-07-12 11:50:53 +0200 |
commit | 1dfd78a9c8961604ec9550b605f63c272624c822 (patch) | |
tree | cbfb8aefb9cd8ac6ca8351923e76def807669930 /src/plugins/cpptools/cppqtstyleindenter.cpp | |
parent | f7b2dd95de1a40dcbbe94a22b92942061dcd8797 (diff) | |
download | qt-creator-1dfd78a9c8961604ec9550b605f63c272624c822.tar.gz |
Indenters: Fix dangling pointer when project settings are deleted.
Task-number: QTCREATORBUG-5390
Change-Id: I68517955a86fbb2ded53f6235a7fe27793e2b2c8
Reviewed-on: http://codereview.qt.nokia.com/1481
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Diffstat (limited to 'src/plugins/cpptools/cppqtstyleindenter.cpp')
-rw-r--r-- | src/plugins/cpptools/cppqtstyleindenter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppqtstyleindenter.cpp b/src/plugins/cpptools/cppqtstyleindenter.cpp index 413e404149..3bcbe813c2 100644 --- a/src/plugins/cpptools/cppqtstyleindenter.cpp +++ b/src/plugins/cpptools/cppqtstyleindenter.cpp @@ -50,6 +50,8 @@ using namespace CppTools; CppQtStyleIndenter::CppQtStyleIndenter() : m_cppCodeStylePreferences(0) { + // Just for safety. setCodeStylePreferences should be called when the editor the + // indenter belongs to gets initialized. m_cppCodeStylePreferences = CppToolsSettings::instance()->cppCodeStylePreferences(); } |