forked from qt-creator/qt-creator
ProjectExplorer: Fix possible accessing null pointer
Change-Id: I285437f8eb21ce9f1a32d631a9c75d32d5ab2859 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -166,6 +166,8 @@ KitManagerConfigWidget *KitModel::widget(const QModelIndex &index)
|
|||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return 0;
|
return 0;
|
||||||
KitNode *node = static_cast<KitNode *>(index.internalPointer());
|
KitNode *node = static_cast<KitNode *>(index.internalPointer());
|
||||||
|
if (node == m_autoRoot || node == m_manualRoot)
|
||||||
|
return 0;
|
||||||
return node->widget;
|
return node->widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user