Fix static analyzer error for null pointer deference.