diff options
author | Itamar <itamar8910@gmail.com> | 2021-05-14 09:42:52 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-14 13:27:47 +0200 |
commit | e9fc5d6cc38f358d9357f4751b6f866b12b268df (patch) | |
tree | 2d844bdc457740204eeb62a806ab947c81d6616e /Userland/DevTools | |
parent | 545b6af3059cc463d27631b729bb6389cfa53c80 (diff) | |
download | serenity-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.cpp | 3 |
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()) { |