coverity/71508: Fix potential null dereference.

Make sure feature pointer is not null before dereferencing.
Merge pull request #1064 from mraghavan/coverity-22-07

coverity/71508: Fix potential null dereference.