From: Scott Cantor Date: Wed, 1 Sep 2010 16:12:52 +0000 (+0000) Subject: Check for null condition variable in case reload thread hasn't started. X-Git-Tag: 1.4RC1~35 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=commitdiff_plain;h=21fa05d230ceb05e97894da089e8213a2db5bbb7 Check for null condition variable in case reload thread hasn't started. --- diff --git a/xmltooling/util/ReloadableXMLFile.cpp b/xmltooling/util/ReloadableXMLFile.cpp index 4499c43..6c2b68a 100644 --- a/xmltooling/util/ReloadableXMLFile.cpp +++ b/xmltooling/util/ReloadableXMLFile.cpp @@ -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;