From ea34f0f03b64aa4fd8927a48a39c8ee037e1c9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 8 Jan 2006 13:05:33 +0000 Subject: [PATCH] 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 --- src/kits/interface/Window.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index ecdd31ad40..ed7bbd3cff 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -312,15 +312,15 @@ BWindow::BWindow(BRect frame, int32 bitmapToken) BWindow::~BWindow() { + fTopView->RemoveSelf(); + delete fTopView; + // remove all existing shortcuts int32 noOfItems = fShortcuts.CountItems(); for (int32 index = noOfItems - 1; index >= 0; index--) { delete (Shortcut *)fShortcuts.ItemAt(index); } - fTopView->RemoveSelf(); - delete fTopView; - // TODO: release other dynamically-allocated objects // Deleting this semaphore will tell open menus to quit.