Fix simple NULL pointer crash