Ver Fonte

HackStudio: Add language client check in identifier click

Bui Quang Minh há 4 anos atrás
pai
commit
ec063f4f63
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      Userland/DevTools/HackStudio/Editor.cpp

+ 3 - 0
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)
 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) {
     m_language_client->on_declaration_found = [this](const String& file, size_t line, size_t column) {
         HackStudio::open_file(file, line, column);
         HackStudio::open_file(file, line, column);
     };
     };