Commit dc613c01 authored by Pawel Polanski's avatar Pawel Polanski
Browse files

Fixed: Creator crashes when trying to deploy to a non existing device

parent 54a9900c
......@@ -135,8 +135,9 @@ bool S60DeployStep::init()
setDisplayName(tr("Deploy", "Qt4 DeployStep display name."));
QString message;
m_launcher = trk::Launcher::acquireFromDeviceManager(m_serialPortName, this, &message);
if (!message.isEmpty()) {
trk::Launcher::releaseToDeviceManager(m_launcher);
if (!message.isEmpty() || !m_launcher) {
if (m_launcher)
trk::Launcher::releaseToDeviceManager(m_launcher);
delete m_launcher;
m_launcher = 0;
appendMessage(message, true);
......
......@@ -1033,6 +1033,8 @@ Launcher *Launcher::acquireFromDeviceManager(const QString &serverName,
// Preliminary release of device, disconnecting the signal.
void Launcher::releaseToDeviceManager(Launcher *launcher)
{
Q_ASSERT(launcher);
SymbianUtils::SymbianDeviceManager *sdm = SymbianUtils::SymbianDeviceManager::instance();
// Disentangle launcher and its device, remove connection from destroyed
launcher->setCloseDevice(false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment