forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user