Fixed a crash that would happen sometimes with BInvoker: If an invoker was
set up with a null replyTo, sometimes BMessage would crash calling IsSourceWaiting() after delivering the message. This appeared to be because fHeader was NULL, but I'm not entirely certain if this is actually supposed to be possible, so this may be masking a different bug. This was observable using the multiline paste spam BAlert in Vision, which would sometimes but not always crash in Haiku after hitting any of the buttons to dismiss it, though consistently when calling IsSourceWaiting() from the private BMessage::_SendMessage(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24228 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c4eca7814d
commit
8c5c17cdbc
|
@ -613,7 +613,7 @@ bool
|
|||
BMessage::IsSourceWaiting() const
|
||||
{
|
||||
DEBUG_FUNCTION_ENTER;
|
||||
return (fHeader->flags & MESSAGE_FLAG_REPLY_REQUIRED)
|
||||
return fHeader && (fHeader->flags & MESSAGE_FLAG_REPLY_REQUIRED)
|
||||
&& !(fHeader->flags & MESSAGE_FLAG_REPLY_DONE);
|
||||
}
|
||||
|
||||
|
@ -622,7 +622,7 @@ bool
|
|||
BMessage::IsSourceRemote() const
|
||||
{
|
||||
DEBUG_FUNCTION_ENTER;
|
||||
return (fHeader->flags & MESSAGE_FLAG_WAS_DELIVERED)
|
||||
return fHeader && (fHeader->flags & MESSAGE_FLAG_WAS_DELIVERED)
|
||||
&& (fHeader->reply_team != BPrivate::current_team());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue