From a6775db3ca2ddc59ea507e587563e838f81f844f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 27 Jun 2012 01:37:18 +0900 Subject: [PATCH] Fixed segmentation fault when logger failed to open log file --- src/Logger.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Logger.cc b/src/Logger.cc index d8ff5653..3e3ee814 100644 --- a/src/Logger.cc +++ b/src/Logger.cc @@ -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(fpp_.get())) { throw DL_ABORT_EX(fmt(EX_FILE_OPEN, filename.c_str(), "n/a")); } }