summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/MultiMC.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp
index 7b4635f1..0911fcc2 100644
--- a/application/MultiMC.cpp
+++ b/application/MultiMC.cpp
@@ -429,13 +429,11 @@ void appDebugOutput(QtMsgType type, const QMessageLogContext &context, const QSt
QString out = format.arg(buf).arg(levels[type]).arg(msg);
- /*
if(MMC->logFile && MMC->logFile->isOpen())
{
MMC->logFile->write(out.toUtf8());
MMC->logFile->flush();
}
- */
QTextStream(stderr) << out.toLocal8Bit();
fflush(stderr);
}
@@ -453,7 +451,7 @@ void MultiMC::initLogger()
logFile = std::make_shared<QFile>(logBase.arg(0));
logFile->open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate);
- if(!logFile->isOpen())
+ if(!logFile || !logFile->isOpen())
{
QTextStream(stderr) << "Couldn't open log file for writing: " << logBase.arg(0).toLocal8Bit();
fflush(stderr);