mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb: Add document null check in ...navigable_target_name_property_set
This commit is contained in:
parent
2eea8894a1
commit
61285ffbee
Notes:
github-actions[bot]
2025-05-30 08:14:38 +00:00
Author: https://github.com/awesomekling
Commit: 61285ffbee
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4922
Reviewed-by: https://github.com/ADKaster
1 changed files with 2 additions and 1 deletions
|
@ -1770,7 +1770,8 @@ OrderedHashMap<FlyString, GC::Ref<Navigable>> Window::document_tree_child_naviga
|
|||
for (auto const& [name, navigable] : first_named_children) {
|
||||
// 1. Let name be navigable's target name.
|
||||
// 2. If navigable's active document's origin is same origin with window's relevant settings object's origin, then append name to names.
|
||||
if (navigable->active_document()->origin().is_same_origin(relevant_settings_object(*this).origin()))
|
||||
auto document = navigable->active_document();
|
||||
if (document && document->origin().is_same_origin(relevant_settings_object(*this).origin()))
|
||||
names.set(name, *navigable);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue