Window's destructor should acquire the menu sem, not delete it. Could help fixing bug 422
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17016 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -316,6 +316,12 @@ BWindow::~BWindow()
|
||||
{
|
||||
Lock();
|
||||
|
||||
// Wait if a menu is still tracking
|
||||
if (fMenuSem > 0) {
|
||||
while (acquire_sem(fMenuSem) == B_INTERRUPTED)
|
||||
;
|
||||
}
|
||||
|
||||
fTopView->RemoveSelf();
|
||||
delete fTopView;
|
||||
|
||||
@@ -328,10 +334,6 @@ BWindow::~BWindow()
|
||||
// TODO: release other dynamically-allocated objects
|
||||
free(fTitle);
|
||||
|
||||
// Deleting this semaphore will tell open menus to quit.
|
||||
if (fMenuSem > 0)
|
||||
delete_sem(fMenuSem);
|
||||
|
||||
// disable pulsing
|
||||
SetPulseRate(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user