Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-05-02 20:28:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-02 21:41:39 +0300
commitc826566ce341cfa6bb02c733a5c70e26542bee9e (patch)
tree2420f32fb1ed7ee2342d7e1ea657e38c6a6298c2 /source/blender/makesrna/intern/rna_sequencer_api.c
parent8e4ac2d229fff53ed7bd7dee638fc0f004c1e12c (diff)
Sound now returns even if file fails to load
With various codecs its hard to ensure a sound will load or not.
Diffstat (limited to 'source/blender/makesrna/intern/rna_sequencer_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index 881688281f3..44169fa641e 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -232,7 +232,8 @@ static Sequence *rna_Sequences_new_sound(ID *id, Editing *ed, Main *bmain, Repor
bSound *sound = BKE_sound_new_file(bmain, file);
- if (sound == NULL || sound->playback_handle == NULL) {
+ if (sound->playback_handle == NULL) {
+ BKE_libblock_free(bmain, sound);
BKE_report(reports, RPT_ERROR, "Sequences.new_sound: unable to open sound file");
return NULL;
}