diff options
author | Elia Sarti <vekoon@gmail.com> | 2010-03-05 22:35:17 +0300 |
---|---|---|
committer | Elia Sarti <vekoon@gmail.com> | 2010-03-05 22:35:17 +0300 |
commit | 5658ef450163b8369246e624cd5d79330d95ca14 (patch) | |
tree | 8cd9fbb4d36575e0e0c722a750d4664b808a82c1 /source | |
parent | 94d5b31b9d33ec51c7b05bb57b2166df2919eaa9 (diff) |
Bugfix for #21452, Crashdown in Video Sequence Editor
Added some NULL checks
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_sequencer/space_sequencer.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index ba405f74ba6..33cb0f5cdd5 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -110,44 +110,44 @@ void ED_sequencer_update_view(bContext *C, int view) switch (view) { case SEQ_VIEW_SEQUENCE: - if (ar_main->flag & RGN_FLAG_HIDDEN) { + if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) { ar_main->flag &= ~RGN_FLAG_HIDDEN; ar_main->v2d.flag &= ~V2D_IS_INITIALISED; } - if (!(ar_preview->flag & RGN_FLAG_HIDDEN)) { + if (ar_preview && !(ar_preview->flag & RGN_FLAG_HIDDEN)) { ar_preview->flag |= RGN_FLAG_HIDDEN; ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; WM_event_remove_handlers(C, &ar_preview->handlers); } - ar_main->alignment= RGN_ALIGN_NONE; - ar_preview->alignment= RGN_ALIGN_NONE; + if (ar_main) ar_main->alignment= RGN_ALIGN_NONE; + if (ar_preview) ar_preview->alignment= RGN_ALIGN_NONE; break; case SEQ_VIEW_PREVIEW: - if (!(ar_main->flag & RGN_FLAG_HIDDEN)) { + if (ar_main && !(ar_main->flag & RGN_FLAG_HIDDEN)) { ar_main->flag |= RGN_FLAG_HIDDEN; ar_main->v2d.flag &= ~V2D_IS_INITIALISED; WM_event_remove_handlers(C, &ar_main->handlers); } - if (ar_preview->flag & RGN_FLAG_HIDDEN) { + if (ar_preview && (ar_preview->flag & RGN_FLAG_HIDDEN)) { ar_preview->flag &= ~RGN_FLAG_HIDDEN; ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; ar_preview->v2d.cur = ar_preview->v2d.tot; } - ar_main->alignment= RGN_ALIGN_NONE; - ar_preview->alignment= RGN_ALIGN_NONE; + if (ar_main) ar_main->alignment= RGN_ALIGN_NONE; + if (ar_preview) ar_preview->alignment= RGN_ALIGN_NONE; break; case SEQ_VIEW_SEQUENCE_PREVIEW: - if (ar_main->flag & RGN_FLAG_HIDDEN) { + if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) { ar_main->flag &= ~RGN_FLAG_HIDDEN; ar_main->v2d.flag &= ~V2D_IS_INITIALISED; } - if (ar_preview->flag & RGN_FLAG_HIDDEN) { + if (ar_preview && (ar_preview->flag & RGN_FLAG_HIDDEN)) { ar_preview->flag &= ~RGN_FLAG_HIDDEN; ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; ar_preview->v2d.cur = ar_preview->v2d.tot; } - ar_main->alignment= RGN_ALIGN_NONE; - ar_preview->alignment= RGN_ALIGN_TOP; + if (ar_main) ar_main->alignment= RGN_ALIGN_NONE; + if (ar_preview) ar_preview->alignment= RGN_ALIGN_TOP; break; } |