Browse Source

[1704] In case NULL is passed as the sync object, do nothing and return

Mukund Sivaraman 13 years ago
parent
commit
328f8781d9
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/lib/log/logger_impl.cc

+ 5 - 0
src/lib/log/logger_impl.cc

@@ -111,6 +111,11 @@ LoggerImpl::lookupMessage(const MessageID& ident) {
 
 void
 LoggerImpl::setInterprocessSync(isc::util::InterprocessSync* sync) {
+    // If we are passed NULL, change nothing. The old sync_ object will
+    // continue to be used.
+    if (sync == NULL)
+        return;
+
     delete sync_;
     sync_ = sync;
 }