Fix a NULL pointer deference.