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