Android: Don't create kits if there is no device

Task-number: QTCREATORBUG-10574

Change-Id: I169762ce9d2388866f1aa16f2b7128cfd42e7cee
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Daniel Teske
2013-10-30 17:02:28 +01:00
parent f7fa44d48a
commit f9ff630346

View File

@@ -857,7 +857,13 @@ void AndroidConfigurations::updateAutomaticKitList()
}
DeviceManager *dm = DeviceManager::instance();
IDevice::ConstPtr device = dm->find(Core::Id(Constants::ANDROID_DEVICE_ID)); // should always exist
IDevice::ConstPtr device = dm->find(Core::Id(Constants::ANDROID_DEVICE_ID));
if (device.isNull()) {
// no device, means no sdk path
foreach (Kit *k, existingKits)
KitManager::deregisterKit(k);
return;
}
// register new kits
QList<Kit *> newKits;