[Bf-blender-cvs] [ef2c05c] master: Fix crash happening when drawing GP for a track which doesn't have visible marker

Sergey Sharybin noreply at git.blender.org
Wed Feb 26 14:43:54 CET 2014


Commit: ef2c05c77e365a07f8ced62e37c9430114b990d8
Author: Sergey Sharybin
Date:   Wed Feb 26 19:42:59 2014 +0600
https://developer.blender.org/rBef2c05c77e365a07f8ced62e37c9430114b990d8

Fix crash happening when drawing GP for a track which doesn't have visible marker

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

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 407ca26..8c015a7 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -1637,10 +1637,12 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip,
 			int framenr = ED_space_clip_get_clip_frame_number(sc);
 			MovieTrackingMarker *marker = BKE_tracking_marker_get_exact(track, framenr);
 
-			offsx = marker->pos[0];
-			offsy = marker->pos[1];
+			if (marker) {
+				offsx = marker->pos[0];
+				offsy = marker->pos[1];
 
-			gpd = track->gpd;
+				gpd = track->gpd;
+			}
 		}
 
 	}




More information about the Bf-blender-cvs mailing list