coverity: Dereference after null check