Don't forget to unlock when there is no desktop listener for the message.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42309 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2011-06-25 02:46:15 +00:00
parent 1dcae018bc
commit ccc37bbb77
1 changed files with 7 additions and 9 deletions

View File

@ -2588,16 +2588,14 @@ Desktop::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
BPrivate::LinkSender reply(clientReplyPort);
LockAllWindows();
if (MessageForListener(NULL, link, reply)) {
UnlockAllWindows();
break;
}
// unhandled message at least send an error if needed
if (link.NeedsReply()) {
reply.StartMessage(B_ERROR);
reply.Flush();
if (MessageForListener(NULL, link, reply) != true) {
// unhandled message, at least send an error if needed
if (link.NeedsReply()) {
reply.StartMessage(B_ERROR);
reply.Flush();
}
}
UnlockAllWindows();
break;
}