Don't assume we have an owner. This fixes a crash in MenuWorld, but needs more investigation
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13427 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7089b0e3dc
commit
1ae414f3c6
@ -1224,7 +1224,7 @@ BMenu::RemoveItems(int32 index, int32 count, BMenuItem *_item, bool del)
|
||||
}
|
||||
|
||||
InvalidateLayout();
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -1336,9 +1336,11 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems,
|
||||
if ((ResizingMode() & B_FOLLOW_LEFT_RIGHT) == B_FOLLOW_LEFT_RIGHT) {
|
||||
if (Parent())
|
||||
*width = Parent()->Frame().Width() + 1;
|
||||
else
|
||||
else if (Window())
|
||||
*width = Window()->Frame().Width() + 1;
|
||||
|
||||
// TODO: We are left without a valid width here ?!?
|
||||
|
||||
*height = frame.Height();
|
||||
} else {
|
||||
*width = frame.Width();
|
||||
|
Loading…
Reference in New Issue
Block a user