summaryrefslogtreecommitdiff
path: root/Source/cmFileMonitor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFileMonitor.cxx')
-rw-r--r--Source/cmFileMonitor.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx
index 03bbf4204d..909be78ed7 100644
--- a/Source/cmFileMonitor.cxx
+++ b/Source/cmFileMonitor.cxx
@@ -334,6 +334,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) {