Be more clean and use a auto lock, thanks Axel.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42343 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2011-06-29 22:00:00 +00:00
parent 6831484d63
commit c30f4641fa

View File

@ -2587,7 +2587,7 @@ Desktop::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
break;
BPrivate::LinkSender reply(clientReplyPort);
LockAllWindows();
AutoWriteLocker locker(fWindowLock);
if (MessageForListener(NULL, link, reply) != true) {
// unhandled message, at least send an error if needed
if (link.NeedsReply()) {
@ -2595,7 +2595,6 @@ Desktop::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
reply.Flush();
}
}
UnlockAllWindows();
break;
}