summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmFileMonitor.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx
index ea37683..815de95 100644
--- a/Source/cmFileMonitor.cxx
+++ b/Source/cmFileMonitor.cxx
@@ -331,6 +331,9 @@ void cmFileMonitor::MonitorPaths(const std::vector<std::string>& paths,
rootSegment)); // Can not be both filename and root part of the path!
const std::string& currentSegment = pathSegments[i];
+ if (currentSegment.empty()) {
+ continue;
+ }
cmIBaseWatcher* nextWatcher = currentWatcher->Find(currentSegment);
if (!nextWatcher) {