diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-08 08:40:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-08 08:40:55 +0400 |
commit | 8aaf4aaae82ec900aaa14b2afdefc3adbf96ec47 (patch) | |
tree | 32338a0ca9f88967be00326a8e85c7373357ae27 /source/blender/editors/space_sequencer | |
parent | b243b4fe4053341b26df698f41c87b80cae8f484 (diff) |
Sequencer: prevent unknown scopes from crashing
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index a51fd49c024..6142814fd3d 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1020,9 +1020,15 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq break; } - scopes->reference_ibuf = ibuf; - viewrectx = scope->x; - viewrecty = scope->y; + /* future files may have new scopes we don't catch above */ + if (scope) { + scopes->reference_ibuf = ibuf; + viewrectx = scope->x; + viewrecty = scope->y; + } + else { + scopes->reference_ibuf = NULL; + } } /* without this colors can flicker from previous opengl state */ |