Skip to content
Snippets Groups Projects
Commit da7b4711 authored by Ton Roosendaal's avatar Ton Roosendaal
Browse files

When Sound blocks are loaded, they can have packedfiles. If a Sound isn't

played (= packedfiles opened and copied to another block) these
packed data blocks where not freed.

The error showed in console at closing of Blender, like:
	read_struct len: 24 0x1c4423c
parent 9095df6e
No related branches found
No related tags found
No related merge requests found
...@@ -28,11 +28,14 @@ ListBase _samples = {0,0}, *samples = &_samples; ...@@ -28,11 +28,14 @@ ListBase _samples = {0,0}, *samples = &_samples;
void sound_free_sound(bSound *sound) void sound_free_sound(bSound *sound)
{ {
/* this crashes blender, PLEASE fix! */ /* when sounds have been loaded, but not played, the packedfile was not copied
// still crashes :( to sample block and not freed otherwise */
//if (sound) { if(sound->sample==NULL) {
// sound_set_sample(sound, NULL); if (sound->newpackedfile) {
//} freePackedFile(sound->newpackedfile);
sound->newpackedfile = NULL;
}
}
if (sound->stream) MEM_freeN(sound->stream); if (sound->stream) MEM_freeN(sound->stream);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment