From ce8f1939e9ca7f080013caa96f6a0ade89219dd1 Mon Sep 17 00:00:00 2001 From: MacDue Date: Mon, 27 Mar 2023 18:29:47 +0100 Subject: [PATCH] Ladybird: Don't update the zoom menu text for null tabs This fixes an "Assertion `m_zoom_menu && m_current_tab' failed." error when closing a window. --- Ladybird/BrowserWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Ladybird/BrowserWindow.cpp b/Ladybird/BrowserWindow.cpp index 374483906d..23d2ec9d22 100644 --- a/Ladybird/BrowserWindow.cpp +++ b/Ladybird/BrowserWindow.cpp @@ -335,7 +335,8 @@ BrowserWindow::BrowserWindow(Browser::CookieJar& cookie_jar, StringView webdrive void BrowserWindow::set_current_tab(Tab* tab) { m_current_tab = tab; - update_zoom_menu_text(); + if (tab) + update_zoom_menu_text(); } void BrowserWindow::debug_request(DeprecatedString const& request, DeprecatedString const& argument)