From e20cd1d8dbfd594774cdf5cba23965e5d884e3f3 Mon Sep 17 00:00:00 2001 From: Itamar Date: Fri, 26 Feb 2021 21:27:08 +0200 Subject: [PATCH] LanguageServers/Cpp: Don't VERIFY that a file could be found ... when creating a new DocumentData --- .../HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp index 50bc03ba8b..76b911baca 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp +++ b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp @@ -60,7 +60,8 @@ const ParserAutoComplete::DocumentData& ParserAutoComplete::get_document_data(co OwnPtr ParserAutoComplete::create_document_data_for(const String& file) { auto document = filedb().get(file); - VERIFY(document); + if (!document) + return {}; auto content = document->text(); auto document_data = make(document->text(), file); auto root = document_data->parser.parse();