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:
parent
529fd9af5d
commit
6137279338
@ -148,7 +148,9 @@ HWindow::InitGUI()
|
|||||||
|
|
||||||
// setup file menu
|
// setup file menu
|
||||||
SetupMenuField();
|
SetupMenuField();
|
||||||
menu->FindItem(B_TRANSLATE("<none>"))->SetMarked(true);
|
BMenuItem* noneItem = menu->FindItem(B_TRANSLATE("<none>"));
|
||||||
|
if (noneItem != NULL)
|
||||||
|
noneItem->SetMarked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user