[Bf-blender-cvs] [aca58ae970d] master: Tracking: Early output when drawing 0 path points

Sergey Sharybin noreply at git.blender.org
Tue Sep 17 09:32:23 CEST 2019


Commit: aca58ae970de5e581554cf57476befdbf2c89012
Author: Sergey Sharybin
Date:   Tue Sep 17 09:31:21 2019 +0200
Branches: master
https://developer.blender.org/rBaca58ae970de5e581554cf57476befdbf2c89012

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.

===================================================================

M	source/blender/editors/space_clip/clip_draw.c

===================================================================

diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 21a9285c0f3..c847c7d07bb 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -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];



More information about the Bf-blender-cvs mailing list