#4578 avoid possible npe