null-ptr-exp - code revire fix