forked from qt-creator/qt-creator
ToolChainOptionsPage: Check for null pointer
Change-Id: I33ec41f3f1bd58bd236bceac71d4c709957c8332 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
b437b988e5
commit
02871cb805
@@ -570,6 +570,8 @@ bool ToolChainOptionsPage::matches(const QString &s) const
|
|||||||
|
|
||||||
void ToolChainOptionsPage::toolChainSelectionChanged()
|
void ToolChainOptionsPage::toolChainSelectionChanged()
|
||||||
{
|
{
|
||||||
|
if (!m_container)
|
||||||
|
return;
|
||||||
QModelIndex current = currentIndex();
|
QModelIndex current = currentIndex();
|
||||||
(void)m_container->takeWidget(); // Prevent deletion.
|
(void)m_container->takeWidget(); // Prevent deletion.
|
||||||
QWidget *currentTcWidget = current.isValid() ? m_model->widget(current) : 0;
|
QWidget *currentTcWidget = current.isValid() ? m_model->widget(current) : 0;
|
||||||
|
Reference in New Issue
Block a user