mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
40f11f8
Fix for issue #9775. Added check for open() returning a NULL pointer. (kirit93)
This commit is contained in:
commit
8ad31f9aa3
@ -214,13 +214,14 @@ void OpenDebugLog()
|
||||
assert(vMsgsBeforeOpenLog);
|
||||
boost::filesystem::path pathDebug = GetDataDir() / "debug.log";
|
||||
fileout = fopen(pathDebug.string().c_str(), "a");
|
||||
if (fileout) setbuf(fileout, NULL); // unbuffered
|
||||
|
||||
if (fileout) {
|
||||
setbuf(fileout, NULL); // unbuffered
|
||||
// dump buffered messages from before we opened the log
|
||||
while (!vMsgsBeforeOpenLog->empty()) {
|
||||
FileWriteStr(vMsgsBeforeOpenLog->front(), fileout);
|
||||
vMsgsBeforeOpenLog->pop_front();
|
||||
}
|
||||
}
|
||||
|
||||
delete vMsgsBeforeOpenLog;
|
||||
vMsgsBeforeOpenLog = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user