forked from qt-creator/qt-creator
Avoid NULL-pointer deref
Change-Id: I49115befb18c5342b96c5561882dcdfa45772f22 Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
This commit is contained in:
committed by
Jarek Kobus
parent
12a99d476c
commit
21cf52aeea
@@ -286,9 +286,10 @@ void CodeStyleSelectorWidget::slotCopyClicked()
|
|||||||
if (!ok)
|
if (!ok)
|
||||||
return;
|
return;
|
||||||
ICodeStylePreferences *copy = codeStylePool->cloneCodeStyle(currentPreferences);
|
ICodeStylePreferences *copy = codeStylePool->cloneCodeStyle(currentPreferences);
|
||||||
copy->setDisplayName(newName);
|
if (copy) {
|
||||||
if (copy)
|
copy->setDisplayName(newName);
|
||||||
m_codeStyle->setCurrentDelegate(copy);
|
m_codeStyle->setCurrentDelegate(copy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CodeStyleSelectorWidget::slotEditClicked()
|
void CodeStyleSelectorWidget::slotEditClicked()
|
||||||
|
Reference in New Issue
Block a user