mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03: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: https://github.com/SerenityOS/serenity/commit/890d5e45ee7 Pull-request: https://github.com/SerenityOS/serenity/pull/10280 Reviewed-by: https://github.com/AtkinsSJ
@ -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…
Reference in New Issue
Block a user