Ensure that we only try to dump font loaded by the defsfont loader

No the cleanest way to check which loader created the sfont,
but as it is just a test tool, it might be good enough...
This commit is contained in:
Marcus Weseloh 2021-03-22 22:44:25 +01:00
parent cc186512ed
commit 703f158c99

View file

@ -67,6 +67,12 @@ int main(int argc, char **argv)
goto EXIT;
}
if (sfont->free != &fluid_defsfont_sfont_delete)
{
fprintf(stderr, "This tool only supports SoundFonts loaded by the default loader\n");
goto EXIT;
}
defsfont = (fluid_defsfont_t *)fluid_sfont_get_data(sfont);
if (defsfont == NULL)
{