diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-12 00:50:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-12 00:50:57 +0400 |
commit | 234a0d8c513e0124ba569868c501668519ab958b (patch) | |
tree | 4a58b410be6da5694759748b7794da60bac31f52 /source/blender/editors/space_clip/clip_draw.c | |
parent | 21e4b12e7a1b821e0eab2c1223e8519a0e85df5e (diff) |
fix for crash drawing grease pencil attached to a tracking marker.
also fix for use of uninitialized variable for ED_clip_point_undistorted_pos().
Diffstat (limited to 'source/blender/editors/space_clip/clip_draw.c')
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index a9b23d5b939..655a09ec90c 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -1467,9 +1467,11 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d) if (track) { int framenr = sc->user.framenr; - MovieTrackingMarker *marker = BKE_tracking_exact_marker(track, framenr); - - glTranslatef(marker->pos[0], marker->pos[1], 0.0f); + /* don't get the exact marker since it may not exist for the frame */ + MovieTrackingMarker *marker = BKE_tracking_get_marker(track, framenr); + if (marker) { + glTranslatef(marker->pos[0], marker->pos[1], 0.0f); + } } } |