mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 13:57:35 +00:00
LibWeb: Only return initialized navigables from child_navigables()
Fixes a crash in `get_session_history_entries()` that happens when it attempts to find entries for a navigable that hasn't been fully initialized and therefore doesn't have a nested history entry yet.
This commit is contained in:
parent
15d265da65
commit
fbc95440a4
1 changed files with 2 additions and 0 deletions
|
@ -62,6 +62,8 @@ Vector<JS::Handle<Navigable>> Navigable::child_navigables() const
|
||||||
{
|
{
|
||||||
Vector<JS::Handle<Navigable>> results;
|
Vector<JS::Handle<Navigable>> results;
|
||||||
for (auto& entry : all_navigables()) {
|
for (auto& entry : all_navigables()) {
|
||||||
|
if (entry->current_session_history_entry()->step == SessionHistoryEntry::Pending::Tag)
|
||||||
|
continue;
|
||||||
if (entry->parent() == this)
|
if (entry->parent() == this)
|
||||||
results.append(entry);
|
results.append(entry);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue