Don't crash on logrotate.

This commit is contained in:
JoelKatz
2013-06-19 10:08:23 -07:00
parent 6c4b870165
commit 5360f69e1e

View File

@@ -286,10 +286,13 @@ void Log::setLogFile (boost::filesystem::path const& path)
outStream = newStream;
if (pathToLog != NULL)
delete pathToLog;
if (pathToLog != &path)
{
if (pathToLog != NULL)
delete pathToLog;
pathToLog = new boost::filesystem::path (path);
pathToLog = new boost::filesystem::path (path);
}
}
bool LogPartition::setSeverity (const std::string& partition, LogSeverity severity)