Check for NULL sfont in fluid_handle_fonts

Closes ticket #139.
This commit is contained in:
Jai Veer 2015-05-12 15:03:30 +05:30 committed by David Henningsson
parent 048c51c4ab
commit 2cc0d0ea17

View file

@ -695,10 +695,15 @@ fluid_handle_fonts(fluid_synth_t* synth, int ac, char** av, fluid_ostream_t out)
for (i = 0; i < num; i++) { for (i = 0; i < num; i++) {
sfont = fluid_synth_get_sfont(synth, i); sfont = fluid_synth_get_sfont(synth, i);
if (sfont) {
fluid_ostream_printf(out, "%2d %s\n", fluid_ostream_printf(out, "%2d %s\n",
fluid_sfont_get_id(sfont), fluid_sfont_get_id(sfont),
fluid_sfont_get_name(sfont)); fluid_sfont_get_name(sfont));
} }
else {
fluid_ostream_printf(out, "sfont is \"NULL\" for index %d\n", i);
}
}
return 0; return 0;
} }