summaryrefslogtreecommitdiff
path: root/services/incremental/path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/incremental/path.cpp')
-rw-r--r--services/incremental/path.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/incremental/path.cpp b/services/incremental/path.cpp
index bf4e9616057c..73e00aed061a 100644
--- a/services/incremental/path.cpp
+++ b/services/incremental/path.cpp
@@ -171,7 +171,9 @@ std::string_view dirname(std::string_view path) {
}
details::CStrWrapper::CStrWrapper(std::string_view sv) {
- if (sv[sv.size()] == '\0') {
+ if (!sv.data()) {
+ mCstr = "";
+ } else if (sv[sv.size()] == '\0') {
mCstr = sv.data();
} else {
mCopy.emplace(sv);