Browser: Ignore title updates when history has no current item
The Browser::History class is oblivious to the state of the browsing context's session history over on the LibWeb side. We need to hook a lot more thing up here, but for now just ignore updates when there's no current history item. This fixes a VERIFY() error on startup.
This commit is contained in:
parent
2b69af2dfe
commit
4814e1bd65
Notes:
sideshowbarker
2024-07-17 06:45:38 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/4814e1bd65
1 changed files with 2 additions and 0 deletions
|
@ -57,6 +57,8 @@ void History::clear()
|
|||
|
||||
void History::update_title(String const& title)
|
||||
{
|
||||
if (m_current == -1)
|
||||
return;
|
||||
m_items[m_current].title = title;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue