- added a missing nullptr check in Instruments::free_soundfonts()

This commit is contained in:
Christoph Oelckers 2018-03-12 18:55:05 +01:00
parent 13ef97c4ac
commit 73248e7f86

View file

@ -223,7 +223,8 @@ void Instruments::free_soundfonts()
SFInsts *sf, *next;
for (sf = sfrecs; sf != NULL; sf = next) {
tf_close(sf->tf);
if (sf->tf != nullptr) tf_close(sf->tf);
sf->tf = nullptr;
reuse_mblock(&sf->pool);
next = sf->next;
free(sf);