Debugger: Fix crash

Change-Id: Id21eb93178c97b3317d1ac7951f81365dfa6d31a
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Orgad Shaneh
2012-10-15 14:20:03 +02:00
committed by hjk
parent 84e4bd30d2
commit 041b82b665

View File

@@ -423,8 +423,8 @@ bool StartApplicationDialog::run(QWidget *parent, QSettings *settings, DebuggerS
sp->serverStartScript = newParameters.serverStartScript;
sp->debugInfoLocation = newParameters.debugInfoLocation;
bool isLocal = DeviceKitInformation::device(kit)->type()
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;
IDevice::ConstPtr dev = DeviceKitInformation::device(kit);
bool isLocal = !dev || (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
if (!attachRemote)
sp->startMode = isLocal ? StartExternal : StartRemoteProcess;
return true;