cgame: fixed null pointer issue reported by cppcheck