BMessage: fix NULL pointer dereference in out of memory condition.

Change-Id: I75ba6e5069cda8a92fd88bf7d1e999232359e73c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1864
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Adrien Destugues 2019-09-14 21:25:49 +02:00 committed by waddlesplash
parent 4015b5877f
commit d761df9f70

View File

@ -165,8 +165,9 @@ BMessage::BMessage(BMessage* other)
BMessage::BMessage(uint32 _what)
{
DEBUG_FUNCTION_ENTER;
_InitCommon(true);
fHeader->what = what = _what;
if (_InitCommon(true))
fHeader->what = _what;
what = _what;
}