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); 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;
}
// unhandled message at least send an error if needed
if (link.NeedsReply()) { if (link.NeedsReply()) {
reply.StartMessage(B_ERROR); reply.StartMessage(B_ERROR);
reply.Flush(); reply.Flush();
} }
}
UnlockAllWindows();
break; break;
} }