forked from qt-creator/qt-creator
Fix crash if no qt version is registered
Change-Id: Ib3b4b2379999061b04923b98044ed83743cd6423 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
This commit is contained in:
@@ -124,6 +124,9 @@ int ExampleSetModel::indexForQtVersion(BaseQtVersion *qtVersion) const
|
||||
{
|
||||
// return either the entry with the same QtId, or an extra example set with same path
|
||||
|
||||
if (!qtVersion)
|
||||
return -1;
|
||||
|
||||
// check for Qt version
|
||||
for (int i = 0; i < rowCount(); ++i) {
|
||||
if (getType(i) == QtExampleSet && getQtId(i) == qtVersion->uniqueId())
|
||||
|
||||
Reference in New Issue
Block a user