From e9fc5d6cc38f358d9357f4751b6f866b12b268df Mon Sep 17 00:00:00 2001 From: Itamar Date: Fri, 14 May 2021 09:42:52 +0300 Subject: LanguageServers: Allow set_declarations_of_document callback to be null --- Userland/DevTools/HackStudio/LanguageServers/AutoCompleteEngine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Userland') diff --git a/Userland/DevTools/HackStudio/LanguageServers/AutoCompleteEngine.cpp b/Userland/DevTools/HackStudio/LanguageServers/AutoCompleteEngine.cpp index 4c930f99ce..7a1ede92b3 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/AutoCompleteEngine.cpp +++ b/Userland/DevTools/HackStudio/LanguageServers/AutoCompleteEngine.cpp @@ -19,7 +19,8 @@ AutoCompleteEngine::~AutoCompleteEngine() } void AutoCompleteEngine::set_declarations_of_document(const String& filename, Vector&& declarations) { - VERIFY(set_declarations_of_document_callback); + if (!set_declarations_of_document_callback) + return; // Optimization - Only notify callback if declarations have changed if (auto previous_declarations = m_all_declarations.get(filename); previous_declarations.has_value()) { -- cgit v1.2.3