mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
LibWeb: Don't choose destroyed navigables in choose a navigable AO
There's a chance that we try to choose a navigable before a previously destroyed navigable is fully destroyed and GC'd. Investigating why this can happen is a separate endeavor, let's just not crash for now.
This commit is contained in:
parent
eaa568210f
commit
a0e7af0cd9
1 changed files with 1 additions and 1 deletions
|
@ -312,7 +312,7 @@ Navigable::ChosenNavigable Navigable::choose_a_navigable(StringView name, Tokeni
|
|||
JS::GCPtr<Navigable> same_name_navigable = nullptr;
|
||||
if (!Infra::is_ascii_case_insensitive_match(name, "_blank"sv)) {
|
||||
for (auto& n : all_navigables()) {
|
||||
if (n->target_name() == name) {
|
||||
if (n->target_name() == name && !n->has_been_destroyed()) {
|
||||
same_name_navigable = n;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue