Tracking: Early output when drawing 0 path points

The rumors says that immBegin() will assert fail on 0 count. Not sure where exactly
that happens (can't reproduce that), but early output can't hurt.
This commit is contained in:
Sergey Sharybin
2019-09-17 09:31:21 +02:00
parent e40dc53c44
commit aca58ae970

View File

@@ -462,6 +462,9 @@ static void draw_track_path_points(const TrackPathPoint *path,
const int start_point,
const int num_points)
{
if (num_points == 0) {
return;
}
immBegin(GPU_PRIM_POINTS, num_points);
for (int i = 0; i < num_points; i++) {
const TrackPathPoint *point = &path[i + start_point];