Skip to content

Commit ca2f65d

Browse files
committed
Destroy sfloaders after all sfonts have been destroyed
1 parent 92f81cb commit ca2f65d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/synth/fluid_synth.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,16 +1220,6 @@ delete_fluid_synth(fluid_synth_t *synth)
12201220

12211221
delete_fluid_list(synth->sfont);
12221222

1223-
/* delete all the SoundFont loaders */
1224-
1225-
for(list = synth->loaders; list; list = fluid_list_next(list))
1226-
{
1227-
loader = (fluid_sfloader_t *) fluid_list_get(list);
1228-
fluid_sfloader_delete(loader);
1229-
}
1230-
1231-
delete_fluid_list(synth->loaders);
1232-
12331223
/* wait for and delete all the lazy sfont unloading timers */
12341224

12351225
for(list = synth->fonts_to_be_unloaded; list; list = fluid_list_next(list))
@@ -1243,6 +1233,16 @@ delete_fluid_synth(fluid_synth_t *synth)
12431233

12441234
delete_fluid_list(synth->fonts_to_be_unloaded);
12451235

1236+
/* delete all the SoundFont loaders */
1237+
1238+
for(list = synth->loaders; list; list = fluid_list_next(list))
1239+
{
1240+
loader = (fluid_sfloader_t *) fluid_list_get(list);
1241+
fluid_sfloader_delete(loader);
1242+
}
1243+
1244+
delete_fluid_list(synth->loaders);
1245+
12461246
if(synth->channel != NULL)
12471247
{
12481248
for(i = 0; i < synth->midi_channels; i++)

0 commit comments

Comments
 (0)