Fix for crash when stopping running an app over CODA TCP

This commit is contained in:
Tom Sutcliffe
2011-03-04 13:43:25 +01:00
committed by Pawel Polanski
parent b9614cdf7d
commit 2cc342a882
4 changed files with 189 additions and 188 deletions

View File

@@ -134,7 +134,7 @@ bool CodaRunControl::setupLauncher()
m_codaDevice->sendSerialPing(false);
} else {
// For TCP we don't use device manager, we just set it up directly
m_codaDevice = QSharedPointer<Coda::CodaDevice>(new Coda::CodaDevice);
m_codaDevice = QSharedPointer<Coda::CodaDevice>(new Coda::CodaDevice, &QObject::deleteLater); // finishRunControl, which deletes m_codaDevice, can get called from within a coda callback, so need to use deleteLater
connect(m_codaDevice.data(), SIGNAL(error(QString)), this, SLOT(slotError(QString)));
connect(m_codaDevice.data(), SIGNAL(logMessage(QString)), this, SLOT(slotTrkLogMessage(QString)));
connect(m_codaDevice.data(), SIGNAL(tcfEvent(Coda::CodaEvent)), this, SLOT(slotCodaEvent(Coda::CodaEvent)));