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:
@@ -60,7 +60,6 @@
|
|||||||
#include <PrivateScreen.h>
|
#include <PrivateScreen.h>
|
||||||
#include <ServerProtocol.h>
|
#include <ServerProtocol.h>
|
||||||
|
|
||||||
|
|
||||||
using namespace BPrivate;
|
using namespace BPrivate;
|
||||||
|
|
||||||
// Globals ---------------------------------------------------------------------
|
// Globals ---------------------------------------------------------------------
|
||||||
@@ -1161,15 +1160,15 @@ bool
|
|||||||
BApplication::window_quit_loop(bool quitFilePanels, bool force)
|
BApplication::window_quit_loop(bool quitFilePanels, bool force)
|
||||||
{
|
{
|
||||||
BList looperList;
|
BList looperList;
|
||||||
BObjectLocker<BLooperList> listLock(gLooperList);
|
{
|
||||||
if (listLock.IsLocked())
|
BObjectLocker<BLooperList> listLock(gLooperList);
|
||||||
gLooperList.GetLooperList(&looperList);
|
if (listLock.IsLocked())
|
||||||
|
gLooperList.GetLooperList(&looperList);
|
||||||
|
}
|
||||||
|
|
||||||
for (int32 i = looperList.CountItems(); i-- > 0; ) {
|
for (int32 i = looperList.CountItems(); i-- > 0; ) {
|
||||||
BWindow *window = dynamic_cast<BWindow *>((BLooper *)looperList.ItemAt(i));
|
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 != NULL && window->Lock()) {
|
||||||
if ((window->IsFilePanel() && !quitFilePanels)
|
if ((window->IsFilePanel() && !quitFilePanels)
|
||||||
|| (!force && !window->QuitRequested())) {
|
|| (!force && !window->QuitRequested())) {
|
||||||
@@ -1181,7 +1180,6 @@ BApplication::window_quit_loop(bool quitFilePanels, bool force)
|
|||||||
window->Quit();
|
window->Quit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user