Unverified Commit 27de23be authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6339 from DonLakeFlyer/LogShutdownCrash

Fix crash from bad toolbox reference during shutdown
parents c4478240 8b7f0358
......@@ -92,8 +92,7 @@ void AppLogModel::threadsafeLog(const QString message)
insertRows(line, 1);
setData(index(line), message, Qt::DisplayRole);
if (qgcApp()->logOutput()) {
if (_logFile.fileName().isEmpty()) {
if (_logFile.fileName().isEmpty() && qgcApp()->logOutput()) {
QGCToolbox* toolbox = qgcApp()->toolbox();
// Be careful of toolbox not being open yet
if (toolbox) {
......@@ -112,5 +111,4 @@ void AppLogModel::threadsafeLog(const QString message)
QTextStream out(&_logFile);
out << message << "\n";
}
}
}
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