Web+: missing NULL check in bookmark bar show/hide management.

This commit is contained in:
Adrien Destugues
2016-11-06 10:52:47 +01:00
parent a02a1bb4e6
commit 5bc7366fca
+4 -1
View File
@@ -2650,8 +2650,11 @@ void
BrowserWindow::_ShowBookmarkBar(bool show)
{
// It is not allowed to show the bookmark bar when it is empty
if (show && fBookmarkBar->CountItems() <= 1)
if (show && (!fBookmarkBar || fBookmarkBar->CountItems() <= 1))
{
fBookmarkBarMenuItem->SetMarked(false);
return;
}
fBookmarkBarMenuItem->SetMarked(show);