Solved a deadlock situation which occured when quiting be_app.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11699 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca
2005-03-12 19:20:10 +00:00
parent 4ef509f03b
commit c92d950958
+5 -7
View File
@@ -60,7 +60,6 @@
#include <PrivateScreen.h>
#include <ServerProtocol.h>
using namespace BPrivate;
// Globals ---------------------------------------------------------------------
@@ -1161,15 +1160,15 @@ bool
BApplication::window_quit_loop(bool quitFilePanels, bool force)
{
BList looperList;
BObjectLocker<BLooperList> listLock(gLooperList);
if (listLock.IsLocked())
gLooperList.GetLooperList(&looperList);
{
BObjectLocker<BLooperList> listLock(gLooperList);
if (listLock.IsLocked())
gLooperList.GetLooperList(&looperList);
}
for (int32 i = looperList.CountItems(); i-- > 0; ) {
BWindow *window = dynamic_cast<BWindow *>((BLooper *)looperList.ItemAt(i));
// ToDo: windows in this list may already have been closed in the mean time?!
if (window != NULL && window->Lock()) {
if ((window->IsFilePanel() && !quitFilePanels)
|| (!force && !window->QuitRequested())) {
@@ -1181,7 +1180,6 @@ BApplication::window_quit_loop(bool quitFilePanels, bool force)
window->Quit();
}
}
return true;
}