mirror of
https://github.com/aria2/aria2.git
synced 2025-01-08 11:01:38 +00:00
Fixed segmentation fault when logger failed to open log file
This commit is contained in:
parent
3ce6070107
commit
a6775db3ca
@ -76,7 +76,7 @@ void Logger::openFile(const std::string& filename)
|
||||
fpp_ = global::cout();
|
||||
} else {
|
||||
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"));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user