forked from qt-creator/qt-creator
Android: Fix crash if avds cpu's could not be determined
That can happen on strange setups with multiple avds Task-number: QTCREATORBUG-10362 Change-Id: Ib6fef4ee3538632c2c71264d6a6c43e3bd917c69 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -74,8 +74,10 @@ QVariant AvdModel::data(const QModelIndex &index, int role) const
|
||||
return m_list[index.row()].serialNumber;
|
||||
case 1:
|
||||
return QString::fromLatin1("API %1").arg(m_list[index.row()].sdk);
|
||||
case 2:
|
||||
return m_list[index.row()].cpuAbi.first();
|
||||
case 2: {
|
||||
QStringList cpuAbis = m_list[index.row()].cpuAbi;
|
||||
return cpuAbis.isEmpty() ? QVariant() : QVariant(cpuAbis.first());
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user