rm potential null ptr deref (Coverity)