Преглед изворни кода

HackStudio: Add language client check in identifier click

Bui Quang Minh пре 4 година
родитељ
комит
ec063f4f63
1 измењених фајлова са 3 додато и 0 уклоњено
  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)
 {
+    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);
     };