CID-639: Protect against FindItem() potentially returning NULL

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38187 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe 2010-08-17 14:42:14 +00:00
parent 529fd9af5d
commit 6137279338

View File

@ -148,7 +148,9 @@ HWindow::InitGUI()
// setup file menu
SetupMenuField();
menu->FindItem(B_TRANSLATE("<none>"))->SetMarked(true);
BMenuItem* noneItem = menu->FindItem(B_TRANSLATE("<none>"));
if (noneItem != NULL)
noneItem->SetMarked(true);
}