Now we delete the menu semaphore in the window's destructor

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12785 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2005-05-23 13:56:06 +00:00
parent 063446f455
commit 87ab5d5c6d
1 changed files with 6 additions and 1 deletions

View File

@ -122,7 +122,8 @@ static property_info windowPropInfo[] = {
void void
_set_menu_sem_(BWindow *window, sem_id sem) _set_menu_sem_(BWindow *window, sem_id sem)
{ {
window->fMenuSem=sem; if (window != NULL)
window->fMenuSem = sem;
} }
@ -221,6 +222,10 @@ BWindow::~BWindow()
} }
// TODO: release other dynamically-allocated objects // TODO: release other dynamically-allocated objects
// Deleting this semaphore will tell open menus to quit.
if (fMenuSem > 0)
delete_sem(fMenuSem);
// disable pulsing // disable pulsing
SetPulseRate(0); SetPulseRate(0);