From ec063f4f63d4987a7bde0a9696b66c967a60a64d Mon Sep 17 00:00:00 2001 From: Bui Quang Minh Date: Tue, 9 Mar 2021 10:39:05 +0700 Subject: [PATCH] HackStudio: Add language client check in identifier click --- Userland/DevTools/HackStudio/Editor.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/DevTools/HackStudio/Editor.cpp b/Userland/DevTools/HackStudio/Editor.cpp index 6a6ef07ed1..71f703d05d 100644 --- a/Userland/DevTools/HackStudio/Editor.cpp +++ b/Userland/DevTools/HackStudio/Editor.cpp @@ -529,6 +529,9 @@ void Editor::on_navigatable_link_click(const GUI::TextDocumentSpan& span) void Editor::on_identifier_click(const GUI::TextDocumentSpan& span) { + if (!m_language_client) + return; + m_language_client->on_declaration_found = [this](const String& file, size_t line, size_t column) { HackStudio::open_file(file, line, column); };