Fix null pointer dereference.

MFC after:	2 weeks
Coverity CID:	1256497
Sponsored by:	The FreeBSD Foundation