CODA: Fixed crash when redeploying

Change-Id: Id154468d6ee4db4eb045fde8a0e858ad5b17428f
Reviewed-on: http://codereview.qt-project.org/4469
Reviewed-by: Paweł Polański <jaggernod@gmail.com>
This commit is contained in:
Pawel Polanski
2011-09-08 15:57:52 +02:00
committed by Paweł Polański
parent eb206dfed7
commit 436c5a768b

View File

@@ -321,6 +321,10 @@ void CodaRunControl::handleAddListener(const CodaCommandResult &result)
void CodaRunControl::handleDebugSessionStarted(const CodaCommandResult &result) void CodaRunControl::handleDebugSessionStarted(const CodaCommandResult &result)
{ {
Q_UNUSED(result) Q_UNUSED(result)
if (m_codaDevice.isNull()) {
finishRunControl();
return;
}
m_state = StateDebugSessionStarted; m_state = StateDebugSessionStarted;
m_codaDevice->sendLoggingAddListenerCommand(CodaCallback(this, &CodaRunControl::handleAddListener)); m_codaDevice->sendLoggingAddListenerCommand(CodaCallback(this, &CodaRunControl::handleAddListener));
} }