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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user