forked from qt-creator/qt-creator
Fix crash on Preferences dialog close
Mitigation for regression introduced by
74ac09346f.
On finish() method call m_widget maybe nullptr, so call for any him
methods is dangerous without checking for nullptr.
Change-Id: Ia7ab5572946fef9bcc62c63709e5ffc69cd2ebae
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
This commit is contained in:
@@ -439,7 +439,8 @@ void CppCodeStyleSettingsPage::apply()
|
||||
|
||||
void CppCodeStyleSettingsPage::finish()
|
||||
{
|
||||
m_widget->finish();
|
||||
if (m_widget)
|
||||
m_widget->finish();
|
||||
delete m_widget;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user