From cd9660c79a5739c39707c1ab3b0518a673c8287b Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 6 Feb 2007 17:30:54 +0000 Subject: [PATCH] Moved sending the B_NO_REPLY reply from the destructor to the more general _Clear(), so that the assignment operator and Flatten() will trigger such a reply as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20083 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/app/Message.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/kits/app/Message.cpp b/src/kits/app/Message.cpp index 757f375b45..999f42aacd 100644 --- a/src/kits/app/Message.cpp +++ b/src/kits/app/Message.cpp @@ -102,9 +102,6 @@ BMessage::BMessage(const BMessage &other) BMessage::~BMessage() { DEBUG_FUNCTION_ENTER; - // TODO: Check why we don't do that in _Clear() and fix or comment it. - if (IsSourceWaiting()) - SendReply(B_NO_REPLY); _Clear(); } @@ -219,6 +216,12 @@ status_t BMessage::_Clear() { DEBUG_FUNCTION_ENTER; + // We're going to destroy all information of this message. If there's + // still someone waiting for a reply to this message, we have to send + // one now. + if (IsSourceWaiting()) + SendReply(B_NO_REPLY); + if (fClonedArea >= B_OK) _Dereference();