From e7f3424dca094f6615fe1eb7d57ce2084762c462 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 20 Feb 2014 12:32:47 +1100 Subject: Fix T38723: Crash on loading with NULL sequence stripdata --- source/blender/blenkernel/intern/bpath.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/intern/bpath.c') diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c index 00fff61c6a2..d0883728a71 100644 --- a/source/blender/blenkernel/intern/bpath.c +++ b/source/blender/blenkernel/intern/bpath.c @@ -578,13 +578,14 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int SEQ_BEGIN(scene->ed, seq) { if (SEQ_HAS_PATH(seq)) { - if (ELEM(seq->type, SEQ_TYPE_MOVIE, SEQ_TYPE_SOUND_RAM)) { - rewrite_path_fixed_dirfile(seq->strip->dir, seq->strip->stripdata->name, + StripElem *se = seq->strip->stripdata; + + if (ELEM(seq->type, SEQ_TYPE_MOVIE, SEQ_TYPE_SOUND_RAM) && se) { + rewrite_path_fixed_dirfile(seq->strip->dir, se->name, visit_cb, absbase, bpath_user_data); } - else if (seq->type == SEQ_TYPE_IMAGE) { + else if ((seq->type == SEQ_TYPE_IMAGE) && se) { /* might want an option not to loop over all strips */ - StripElem *se = seq->strip->stripdata; int len = MEM_allocN_len(se) / sizeof(*se); int i; -- cgit v1.2.3