From c92d95095800431e83d15fff493b8b032e0b310b Mon Sep 17 00:00:00 2001 From: Adi Oanca Date: Sat, 12 Mar 2005 19:20:10 +0000 Subject: [PATCH] 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 --- src/kits/app/Application.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/kits/app/Application.cpp b/src/kits/app/Application.cpp index bf04e2f4e9..840651e6eb 100644 --- a/src/kits/app/Application.cpp +++ b/src/kits/app/Application.cpp @@ -60,7 +60,6 @@ #include #include - using namespace BPrivate; // Globals --------------------------------------------------------------------- @@ -1161,15 +1160,15 @@ bool BApplication::window_quit_loop(bool quitFilePanels, bool force) { BList looperList; - BObjectLocker listLock(gLooperList); - if (listLock.IsLocked()) - gLooperList.GetLooperList(&looperList); + { + BObjectLocker listLock(gLooperList); + if (listLock.IsLocked()) + gLooperList.GetLooperList(&looperList); + } for (int32 i = looperList.CountItems(); i-- > 0; ) { BWindow *window = dynamic_cast((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; }