mirror of https://github.com/aria2/aria2
Fixed segmentation fault when logger failed to open log file
parent
3ce6070107
commit
a6775db3ca
|
@ -76,7 +76,7 @@ void Logger::openFile(const std::string& filename)
|
||||||
fpp_ = global::cout();
|
fpp_ = global::cout();
|
||||||
} else {
|
} else {
|
||||||
fpp_.reset(new BufferedFile(filename, BufferedFile::APPEND));
|
fpp_.reset(new BufferedFile(filename, BufferedFile::APPEND));
|
||||||
if(!fpp_) {
|
if(!*static_cast<BufferedFile*>(fpp_.get())) {
|
||||||
throw DL_ABORT_EX(fmt(EX_FILE_OPEN, filename.c_str(), "n/a"));
|
throw DL_ABORT_EX(fmt(EX_FILE_OPEN, filename.c_str(), "n/a"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue