diff --git a/src/util/AllocatedString.hxx b/src/util/AllocatedString.hxx index f2bc4f4fa..a1f8cd073 100644 --- a/src/util/AllocatedString.hxx +++ b/src/util/AllocatedString.hxx @@ -125,7 +125,9 @@ public: } operator string_view() const noexcept { - return value; + return value != nullptr + ? string_view(value) + : string_view(); } constexpr const_pointer c_str() const noexcept {