Fix T38723: Crash on loading with NULL sequence stripdata

This commit is contained in:
Campbell Barton 2014-02-20 12:32:47 +11:00
parent ea58918171
commit e7f3424dca
Notes: blender-bot 2023-02-14 11:10:56 +01:00
Referenced by issue #38996, bpy.ops.view3d.view_selected crashes with overridden context
Referenced by issue #38723, specific file crashes blender on load
Referenced by issue #38679, Cycles GPU Performance Regression on Titan
1 changed files with 5 additions and 4 deletions

View File

@ -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;