LibWeb: Prevent potential null deref in editing delete action

This commit is contained in:
Jelle Raaijmakers 2024-12-20 11:39:27 +01:00 committed by Jelle Raaijmakers
parent a7c75f6fdb
commit ff25d66dae
Notes: github-actions[bot] 2024-12-21 18:17:08 +00:00

View file

@ -214,7 +214,7 @@ bool command_delete_action(DOM::Document& document, String const&)
// start node to its parent.
if (start_offset == 0) {
start_offset = start_node->index();
start_node = *start_node->parent();
start_node = start_node->parent();
continue;
}