From fca9c231a0a798bbb0ba2f65c61adcc668f93eb1 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 6 Dec 2011 12:04:39 +0000 Subject: Fixed crash when movie clip curves region is opened and clip is getting unlinked --- source/blender/editors/space_clip/clip_graph_draw.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_clip') diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c index 7b14783d4ca..5a904e0e9b6 100644 --- a/source/blender/editors/space_clip/clip_graph_draw.c +++ b/source/blender/editors/space_clip/clip_graph_draw.c @@ -235,6 +235,7 @@ static void draw_frame_curves(SpaceClip *sc) void clip_draw_graph(SpaceClip *sc, ARegion *ar, Scene *scene) { + MovieClip *clip= ED_space_clip(sc); View2D *v2d= &ar->v2d; View2DGrid *grid; short unitx= V2D_UNIT_FRAMESCALE, unity= V2D_UNIT_VALUES; @@ -244,11 +245,13 @@ void clip_draw_graph(SpaceClip *sc, ARegion *ar, Scene *scene) UI_view2d_grid_draw(v2d, grid, V2D_GRIDLINES_ALL); UI_view2d_grid_free(grid); - if(sc->flag&SC_SHOW_GRAPH_TRACKS) - draw_tracks_curves(v2d, sc); + if(clip) { + if(sc->flag&SC_SHOW_GRAPH_TRACKS) + draw_tracks_curves(v2d, sc); - if(sc->flag&SC_SHOW_GRAPH_FRAMES) - draw_frame_curves(sc); + if(sc->flag&SC_SHOW_GRAPH_FRAMES) + draw_frame_curves(sc); + } /* current frame */ draw_graph_cfra(sc, ar, scene); -- cgit v1.2.3