Check for null condition variable in case reload thread hasn't started.
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Wed, 1 Sep 2010 16:12:52 +0000 (16:12 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Wed, 1 Sep 2010 16:12:52 +0000 (16:12 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/branches/REL_1@783 de75baf8-a10c-0410-a50a-987c0e22f00f

xmltooling/util/ReloadableXMLFile.cpp

index 4499c43..6c2b68a 100644 (file)
@@ -363,8 +363,13 @@ Lockable* ReloadableXMLFile::lock()
 
         // Update the timestamp regardless.
         m_filestamp = stat_buf.st_mtime;
-        m_log.info("change detected, signaling reload thread...");
-        m_reload_wait->signal();
+        if (m_reload_wait) {
+            m_log.info("change detected, signaling reload thread...");
+            m_reload_wait->signal();
+        }
+        else {
+            m_log.warn("change detected, but reload thread not started");
+        }
     }
 
     return this;