summaryrefslogtreecommitdiff
path: root/Userland/DevTools
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-05-14 09:42:52 +0300
committerAndreas Kling <kling@serenityos.org>2021-05-14 13:27:47 +0200
commite9fc5d6cc38f358d9357f4751b6f866b12b268df (patch)
tree2d844bdc457740204eeb62a806ab947c81d6616e /Userland/DevTools
parent545b6af3059cc463d27631b729bb6389cfa53c80 (diff)
downloadserenity-e9fc5d6cc38f358d9357f4751b6f866b12b268df.zip
LanguageServers: Allow set_declarations_of_document callback to be null
Diffstat (limited to 'Userland/DevTools')
-rw-r--r--Userland/DevTools/HackStudio/LanguageServers/AutoCompleteEngine.cpp3
1 files changed, 2 insertions, 1 deletions
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<GUI::AutocompleteProvider::Declaration>&& 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()) {