Fix #31970: Crash, whith Sequencer Swap Data-Function
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 2 Jul 2012 10:41:56 +0000 (10:41 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 2 Jul 2012 10:41:56 +0000 (10:41 +0000)
source/blender/editors/space_sequencer/sequencer_edit.c

index bc8133cded63b442b6a0505fa86478bbe8206f6d..7ed5c77ed1fe0bbcf4660e95ca741ef9ed5302e8 100644 (file)
@@ -2694,8 +2694,11 @@ static int sequencer_swap_data_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
 
-       sound_remove_scene_sound(scene, seq_act->scene_sound);
-       sound_remove_scene_sound(scene, seq_other->scene_sound);
+       if (seq_act->scene_sound)
+               sound_remove_scene_sound(scene, seq_act->scene_sound);
+
+       if (seq_other->scene_sound)
+               sound_remove_scene_sound(scene, seq_other->scene_sound);
 
        seq_act->scene_sound = NULL;
        seq_other->scene_sound = NULL;