Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-12-06 16:04:39 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-12-06 16:04:39 +0400
commitfca9c231a0a798bbb0ba2f65c61adcc668f93eb1 (patch)
tree4978cedada7231151517bc64665dfadb9fd32058 /source/blender/editors/space_clip/clip_graph_draw.c
parent3b1e077b397130c4f663161a9b6ce235fa418b8a (diff)
Fixed crash when movie clip curves region is opened and clip is getting unlinked
Diffstat (limited to 'source/blender/editors/space_clip/clip_graph_draw.c')
-rw-r--r--source/blender/editors/space_clip/clip_graph_draw.c11
1 files changed, 7 insertions, 4 deletions
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);