1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-06 21:54:15 +01:00

OP-1077 Prevent GCS flight log corruption when no flight log is chosen

This commit is contained in:
Stefan Karlsson 2014-09-03 21:19:15 +02:00
parent 650cbd3b52
commit 9bfd648879

View File

@ -76,10 +76,12 @@ QIODevice *LoggingConnection::openDevice(const QString &deviceName)
QString fileName = QFileDialog::getOpenFileName(NULL, tr("Open file"), QString(""), tr("OpenPilot Log (*.opl)")); QString fileName = QFileDialog::getOpenFileName(NULL, tr("Open file"), QString(""), tr("OpenPilot Log (*.opl)"));
if (!fileName.isNull()) { if (!fileName.isNull()) {
startReplay(fileName); startReplay(fileName);
}
return &logFile; return &logFile;
} }
return NULL;
}
void LoggingConnection::startReplay(QString file) void LoggingConnection::startReplay(QString file)
{ {
logFile.setFileName(file); logFile.setFileName(file);