Qt: Fix logging trying to open a null file
Vicki Pfau vi@endrift.com
Tue, 21 May 2019 07:17:42 -0700
1 files changed,
3 insertions(+),
0 deletions(-)
M
src/platform/qt/LogController.cpp
→
src/platform/qt/LogController.cpp
@@ -127,6 +127,9 @@ }
void LogController::setLogFile(const QString& file) { m_logStream.reset(); + if (file.isEmpty()) { + return; + } m_logFile = std::make_unique<QFile>(file); m_logFile->open(QIODevice::Append | QIODevice::Text); m_logStream = std::make_unique<QTextStream>(m_logFile.get());