[Bf-blender-cvs] [8aaf4aa] master: Sequencer: prevent unknown scopes from crashing

Campbell Barton noreply at git.blender.org
Wed Jan 8 05:42:03 CET 2014


Commit: 8aaf4aaae82ec900aaa14b2afdefc3adbf96ec47
Author: Campbell Barton
Date:   Wed Jan 8 15:40:55 2014 +1100
https://developer.blender.org/rB8aaf4aaae82ec900aaa14b2afdefc3adbf96ec47

Sequencer: prevent unknown scopes from crashing

===================================================================

M	source/blender/editors/space_sequencer/sequencer_draw.c

===================================================================

diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index a51fd49..6142814 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 */




More information about the Bf-blender-cvs mailing list