forked from qt-creator/qt-creator
Android: Fix crash in AndroidDeployQtStep
info.cpuAbi in AndroidDeployQtStep::init can be empty, for example when opening a configured project with a different Qt Creator version, and the "No valid settings file could be found." message appears. Check for !empty(), before accessing the first item. Fixes: QTCREATORBUG-27795 Change-Id: Ife0bf495ed8ea7bfb342300ee2e457398c8ee8f2 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -201,7 +201,8 @@ bool AndroidDeployQtStep::init()
|
||||
}
|
||||
|
||||
const QtSupport::QtVersion * const qt = QtSupport::QtKitAspect::qtVersion(kit());
|
||||
if (qt && qt->supportsMultipleQtAbis() && !selectedAbis.contains(info.cpuAbi.first())) {
|
||||
if (qt && qt->supportsMultipleQtAbis() && !info.cpuAbi.isEmpty() &&
|
||||
!selectedAbis.contains(info.cpuAbi.first())) {
|
||||
TaskHub::addTask(DeploymentTask(Task::Warning,
|
||||
tr("Android: The main ABI of the deployment device (%1) is not selected. The app "
|
||||
"execution or debugging might not work properly. Add it from Projects > Build > "
|
||||
|
||||
Reference in New Issue
Block a user