diff options
Diffstat (limited to 'Alc/midi/base.c')
-rw-r--r-- | Alc/midi/base.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Alc/midi/base.c b/Alc/midi/base.c index dfa6d1ec..cd6293d2 100644 --- a/Alc/midi/base.c +++ b/Alc/midi/base.c @@ -368,15 +368,24 @@ void ALsfpreset_Construct(ALsfpreset *self) self->Preset = 0; self->Bank = 0; + self->Sounds = NULL; + self->NumSounds = 0; self->id = 0; } void ALsfpreset_Destruct(ALsfpreset *self) { + ALsizei i; + FreeThunkEntry(self->id); self->id = 0; + for(i = 0;i < self->NumSounds;i++) + DecrementRef(&self->Sounds[i]->ref); + free(self->Sounds); + self->Sounds = NULL; + self->NumSounds = 0; } |