Fixed DetachCurrentMessage():

* the current message is not part of the queue when it's dispatched, so it
  doesn't make any sense to try to remove it.
* it's only to be called during message processing - and at that time, the
  looper is locked, anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15079 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-11-22 20:52:36 +00:00
parent b361534e3c
commit 85606ee1de

View File

@ -321,11 +321,8 @@ BLooper::CurrentMessage() const
BMessage*
BLooper::DetachCurrentMessage()
{
Lock();
BMessage* msg = fLastMessage;
fLastMessage = NULL;
fQueue->RemoveMessage(msg);
Unlock();
return msg;
}