diff --git a/source/core/StarDirectives.cpp b/source/core/StarDirectives.cpp index dfea7b0..6208b97 100644 --- a/source/core/StarDirectives.cpp +++ b/source/core/StarDirectives.cpp @@ -98,8 +98,10 @@ void Directives::loadOperations() const { } void Directives::parse(String&& directives) { - if (directives.empty()) + if (directives.empty()) { + shared.reset(); return; + } List newList; StringView view(directives); @@ -123,8 +125,10 @@ void Directives::parse(String&& directives) { } }); - if (newList.empty() && !prefix.empty()) + if (newList.empty() && !prefix.empty()) { + shared.reset(); return; + } shared = std::make_shared(move(newList), move(directives), prefix); if (view.size() < 1000) { // Pre-load short enough directives