Protect against invalid memcpy to NULL bug: 15163357 Change-Id: Ifab17714473f45cb714a0ee765638733b3236ec8