diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-09-17 10:31:21 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-09-17 10:31:21 +0300 |
commit | aca58ae970de5e581554cf57476befdbf2c89012 (patch) | |
tree | 0fd41075a9cacf12a0c1365716967166308e7e37 /source/blender/editors/space_clip | |
parent | e40dc53c44573a454b8069774d89b4770b23ea82 (diff) |
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.
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 3 |
1 files changed, 3 insertions, 0 deletions
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]; |