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.
This commit is contained in:
MacDue 2023-03-27 18:29:47 +01:00 committed by Linus Groh
parent 0471ec0567
commit ce8f1939e9
Notes: sideshowbarker 2024-07-17 01:55:29 +09:00

View file

@ -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)