From a39f0d472acfb4c95d809bba50c203484f4968cf Mon Sep 17 00:00:00 2001 From: Moustafa Raafat Date: Mon, 3 Oct 2022 23:50:39 +0100 Subject: [PATCH] Ladybird/History: Ignore title updates when history has no current item --- Ladybird/History.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Ladybird/History.cpp b/Ladybird/History.cpp index 64e66633a9..1e332b7dca 100644 --- a/Ladybird/History.cpp +++ b/Ladybird/History.cpp @@ -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; }