From 54d2689a50f506dbd38d3b53a2fa00bb3f13c23c Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 4 May 2012 18:00:37 +0000 Subject: Clip editor: fixed crash when opening dopesheet view without having clip opened --- source/blender/editors/space_clip/space_clip.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index 32a4a7d1f83..1c0d2db91a9 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -1135,7 +1135,8 @@ static void dopesheet_area_draw(const bContext *C, ARegion *ar) View2DScrollers *scrollers; short unit = 0; - BKE_tracking_dopesheet_update(&clip->tracking, sc->dope_sort, sc->dope_flag & SC_DOPE_SORT_INVERSE); + if (clip) + BKE_tracking_dopesheet_update(&clip->tracking, sc->dope_sort, sc->dope_flag & SC_DOPE_SORT_INVERSE); /* clear and setup matrix */ UI_ThemeClearColor(TH_BACK); @@ -1194,7 +1195,8 @@ static void clip_channels_area_draw(const bContext *C, ARegion *ar) View2D *v2d = &ar->v2d; View2DScrollers *scrollers; - BKE_tracking_dopesheet_update(&clip->tracking, sc->dope_sort, sc->dope_flag & SC_DOPE_SORT_INVERSE); + if (clip) + BKE_tracking_dopesheet_update(&clip->tracking, sc->dope_sort, sc->dope_flag & SC_DOPE_SORT_INVERSE); /* clear and setup matrix */ UI_ThemeClearColor(TH_BACK); -- cgit v1.2.3