From c992d4f72a4594c6d77c6cd72ab0335d56930ea8 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 5 Sep 2023 16:42:44 +1000 Subject: Update StarDirectives.cpp --- source/core/StarDirectives.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/core/StarDirectives.cpp') 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 -- cgit v1.2.3