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:
@@ -1224,7 +1224,7 @@ BMenu::RemoveItems(int32 index, int32 count, BMenuItem *_item, bool del)
|
|||||||
}
|
}
|
||||||
|
|
||||||
InvalidateLayout();
|
InvalidateLayout();
|
||||||
|
|
||||||
return result;
|
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 ((ResizingMode() & B_FOLLOW_LEFT_RIGHT) == B_FOLLOW_LEFT_RIGHT) {
|
||||||
if (Parent())
|
if (Parent())
|
||||||
*width = Parent()->Frame().Width() + 1;
|
*width = Parent()->Frame().Width() + 1;
|
||||||
else
|
else if (Window())
|
||||||
*width = Window()->Frame().Width() + 1;
|
*width = Window()->Frame().Width() + 1;
|
||||||
|
|
||||||
|
// TODO: We are left without a valid width here ?!?
|
||||||
|
|
||||||
*height = frame.Height();
|
*height = frame.Height();
|
||||||
} else {
|
} else {
|
||||||
*width = frame.Width();
|
*width = frame.Width();
|
||||||
|
|||||||
Reference in New Issue
Block a user