delete the semaphore instead of releasing it, otherwise

DirectConnected() could be called twice with B_DIRECT_STOP when closing 
the BDirectWindow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23718 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2008-01-24 13:43:34 +00:00
parent 0e6fdcf676
commit 020cbad9d4
+2 -2
View File
@@ -536,9 +536,9 @@ BDirectWindow::_DisposeData()
if (fInitStatus & DW_STATUS_THREAD_STARTED) {
fDaemonKiller = true;
// Release this sem, otherwise the Direct daemon thread
// delete this sem, otherwise the Direct daemon thread
// will wait forever on it
release_sem(fDisableSem);
delete_sem(fDisableSem);
status_t retVal;
wait_for_thread(fDirectDaemonId, &retVal);
}