diff options
author | Harrison Marshall <harry130899@hotmail.com> | 2022-02-14 23:06:11 +1100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-14 13:48:05 +0100 |
commit | f53854598752745553c9185740330ea447d4b7c3 (patch) | |
tree | d675a3c6de2deb5a5e664fa7e671391f194bab3c /Userland | |
parent | d345a3689f7d73e76b5b010d5d96d872a13501e0 (diff) | |
download | serenity-f53854598752745553c9185740330ea447d4b7c3.zip |
HackStudio: Fix crash when requesting parameter list
When requesting a parameter hint message with `Ctrl + p` in a file that
doesn't have a language server, we would crash.
Now, rather than verifying that we have a language server, we return
early if we don't have one.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/DevTools/HackStudio/Editor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/Editor.cpp b/Userland/DevTools/HackStudio/Editor.cpp index f0472977e3..724f3c3554 100644 --- a/Userland/DevTools/HackStudio/Editor.cpp +++ b/Userland/DevTools/HackStudio/Editor.cpp @@ -689,7 +689,8 @@ void Editor::keydown_event(GUI::KeyEvent& event) void Editor::handle_function_parameters_hint_request() { - VERIFY(m_language_client); + if (!m_language_client) + return; m_language_client->on_function_parameters_hint_result = [this](Vector<String> const& params, size_t argument_index) { dbgln("on_function_parameters_hint_result"); |