all repos — mgba @ 18f27d5ee6d4d1d74a9a9826c34aab6cbe8219dc

mGBA Game Boy Advance Emulator

Qt: Fix logging trying to open a null file
Vicki Pfau vi@endrift.com
Tue, 21 May 2019 07:17:42 -0700
commit

18f27d5ee6d4d1d74a9a9826c34aab6cbe8219dc

parent

e90b8d235467679229ab16032c64bf8508bb5440

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/platform/qt/LogController.cppsrc/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());