Fix memory leak when building without audaspace
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 6 Feb 2017 10:18:20 +0000 (11:18 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 6 Feb 2017 10:18:20 +0000 (11:18 +0100)
source/blender/blenkernel/intern/sound.c

index 22288127119ec49e10dbda1cefe299651b4666e9..8469351c54aa8ed886b034a23bae6b9ee6af6455 100644 (file)
@@ -147,12 +147,12 @@ void BKE_sound_free(bSound *sound)
 
        BKE_sound_free_waveform(sound);
        
+#endif  /* WITH_AUDASPACE */
        if (sound->spinlock) {
                BLI_spin_end(sound->spinlock);
                MEM_freeN(sound->spinlock);
                sound->spinlock = NULL;
-       }       
-#endif  /* WITH_AUDASPACE */
+       }
 }
 
 void BKE_sound_make_local(Main *bmain, bSound *sound, const bool lib_local)