mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 02:59:45 +00:00
Browser: Check m_console_client is non-null before dereferencing it
This added check matches CientConnection::js_console_input and makes sure the webcontent process doesn't crash if the console is opened while no page is available (like in a file not found situation)
This commit is contained in:
parent
10d4f2fc1e
commit
890d5e45ee
Notes:
sideshowbarker
2024-07-18 03:16:40 +09:00
Author: https://github.com/IdanHo
Commit: 890d5e45ee
Pull-request: https://github.com/SerenityOS/serenity/pull/10280
Reviewed-by: https://github.com/AtkinsSJ
1 changed files with 2 additions and 1 deletions
|
@ -317,7 +317,8 @@ void ClientConnection::run_javascript(String const& js_source)
|
|||
|
||||
void ClientConnection::js_console_request_messages(i32 start_index)
|
||||
{
|
||||
m_console_client->send_messages(start_index);
|
||||
if (m_console_client)
|
||||
m_console_client->send_messages(start_index);
|
||||
}
|
||||
|
||||
Messages::WebContentServer::GetSelectedTextResponse ClientConnection::get_selected_text()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue