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];

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to