Fix for [#26160] Blender Crashes when undoing
Was trying to free audio data from sequencer strips that don't even have audio. Corrected the error in several ways so this will definitely not happen again :-)
This commit is contained in:
parent
5e41760a15
commit
354fc0076e
@ -193,7 +193,7 @@ void seq_free_sequence(Scene *scene, Sequence *seq)
|
|||||||
if (ed->act_seq==seq)
|
if (ed->act_seq==seq)
|
||||||
ed->act_seq= NULL;
|
ed->act_seq= NULL;
|
||||||
|
|
||||||
if(seq->scene_sound)
|
if(seq->scene_sound && ELEM(seq->type, SEQ_SOUND, SEQ_SCENE))
|
||||||
sound_remove_scene_sound(scene, seq->scene_sound);
|
sound_remove_scene_sound(scene, seq->scene_sound);
|
||||||
|
|
||||||
seq_free_animdata(scene, seq);
|
seq_free_animdata(scene, seq);
|
||||||
@ -3399,6 +3399,7 @@ Sequence *alloc_sequence(ListBase *lb, int cfra, int machine)
|
|||||||
seq->mul= 1.0;
|
seq->mul= 1.0;
|
||||||
seq->blend_opacity = 100.0;
|
seq->blend_opacity = 100.0;
|
||||||
seq->volume = 1.0f;
|
seq->volume = 1.0f;
|
||||||
|
seq->scene_sound = NULL;
|
||||||
|
|
||||||
return seq;
|
return seq;
|
||||||
}
|
}
|
||||||
|
@ -4368,6 +4368,7 @@ static void lib_link_scene(FileData *fd, Main *main)
|
|||||||
|
|
||||||
SEQ_BEGIN(sce->ed, seq) {
|
SEQ_BEGIN(sce->ed, seq) {
|
||||||
if(seq->ipo) seq->ipo= newlibadr_us(fd, sce->id.lib, seq->ipo);
|
if(seq->ipo) seq->ipo= newlibadr_us(fd, sce->id.lib, seq->ipo);
|
||||||
|
seq->scene_sound = NULL;
|
||||||
if(seq->scene) {
|
if(seq->scene) {
|
||||||
seq->scene= newlibadr(fd, sce->id.lib, 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);
|
seq->scene_sound = sound_scene_add_scene_sound(sce, seq, seq->startdisp, seq->enddisp, seq->startofs + seq->anim_startofs);
|
||||||
|
Loading…
Reference in New Issue
Block a user