Explorar el Código

Fixed segmentation fault when logger failed to open log file

Tatsuhiro Tsujikawa hace 13 años
padre
commit
a6775db3ca
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/Logger.cc

+ 1 - 1
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<BufferedFile*>(fpp_.get())) {
       throw DL_ABORT_EX(fmt(EX_FILE_OPEN, filename.c_str(), "n/a"));
     }
   }