mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
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.
This commit is contained in:
parent
d345a3689f
commit
f538545987
Notes:
sideshowbarker
2024-07-17 21:26:19 +09:00
Author: https://github.com/gestureleft 🔰 Commit: https://github.com/SerenityOS/serenity/commit/f538545987 Pull-request: https://github.com/SerenityOS/serenity/pull/12516
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user