mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
core/log: fix nullptr crash in ThreadLogging
This commit is contained in:
1 parent
42420ea26d
commit
f7597cdae2
1 file changed
+4
-4
@@ -458,13 +458,13 @@ void ThreadLogging::onMessage(const LogMessage& msg, bool showInSparse) {
|
||||
}
|
||||
|
||||
if (!this->detailedWriter.write(msg) || (this->detailedFile && !this->detailedFile->flush())) {
|
||||
this->detailedWriter.setDevice(nullptr);
|
||||
|
||||
if (this->detailedFile) {
|
||||
this->detailedFile->close();
|
||||
this->detailedFile = nullptr;
|
||||
qCCritical(logLogging) << "Detailed logger failed to write. Ending detailed logs.";
|
||||
}
|
||||
|
||||
this->detailedWriter.setDevice(nullptr);
|
||||
this->detailedFile->close();
|
||||
this->detailedFile = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user