If there was a BMenuItem view with shortcut, it tried to delete the shortcut twice
(as the shortcut list wasn't emptied), courtesy of Stippi. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15866 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -312,15 +312,15 @@ BWindow::BWindow(BRect frame, int32 bitmapToken)
|
|||||||
|
|
||||||
BWindow::~BWindow()
|
BWindow::~BWindow()
|
||||||
{
|
{
|
||||||
|
fTopView->RemoveSelf();
|
||||||
|
delete fTopView;
|
||||||
|
|
||||||
// remove all existing shortcuts
|
// remove all existing shortcuts
|
||||||
int32 noOfItems = fShortcuts.CountItems();
|
int32 noOfItems = fShortcuts.CountItems();
|
||||||
for (int32 index = noOfItems - 1; index >= 0; index--) {
|
for (int32 index = noOfItems - 1; index >= 0; index--) {
|
||||||
delete (Shortcut *)fShortcuts.ItemAt(index);
|
delete (Shortcut *)fShortcuts.ItemAt(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
fTopView->RemoveSelf();
|
|
||||||
delete fTopView;
|
|
||||||
|
|
||||||
// TODO: release other dynamically-allocated objects
|
// TODO: release other dynamically-allocated objects
|
||||||
|
|
||||||
// Deleting this semaphore will tell open menus to quit.
|
// Deleting this semaphore will tell open menus to quit.
|
||||||
|
|||||||
Reference in New Issue
Block a user