Fix crash when closing settings/history tab, from John Carr via freebsd-chromium