fix [#28860] CRASH loading scene
authorCampbell Barton <ideasman42@gmail.com>
Mon, 10 Oct 2011 00:38:32 +0000 (00:38 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 10 Oct 2011 00:38:32 +0000 (00:38 +0000)
Sequence strips with missing scenes were missing a NULL check.

source/blender/blenloader/intern/readfile.c

index ce5805921dcb80f9ac9c37b7a62cde6e0c47ecd5..9ba539acb1665eb11988d3072c1d510d6f926994 100644 (file)
@@ -4494,7 +4494,9 @@ static void lib_link_scene(FileData *fd, Main *main)
                                seq->scene_sound = NULL;
                                if(seq->scene) {
                                        seq->scene= newlibadr(fd, sce->id.lib, seq->scene);
-                                       seq->scene_sound = sound_scene_add_scene_sound(sce, seq, seq->startdisp, seq->enddisp, seq->startofs + seq->anim_startofs);
+                                       if(seq->scene) {
+                                               seq->scene_sound = sound_scene_add_scene_sound(sce, seq, seq->startdisp, seq->enddisp, seq->startofs + seq->anim_startofs);
+                                       }
                                }
                                if(seq->scene_camera) seq->scene_camera= newlibadr(fd, sce->id.lib, seq->scene_camera);
                                if(seq->sound) {