Fix crash when testing invalid MIDI file.
smf_delete() does not handle NULL pointers. This fixes a crash when checking if a MIDI source is valid.
This commit is contained in:
parent
1698abc382
commit
43c76ff23b
@ -100,7 +100,9 @@ SMF::test(const std::string& path)
|
||||
if (!test_smf) {
|
||||
return false;
|
||||
}
|
||||
smf_delete(test_smf);
|
||||
if (test_smf) {
|
||||
smf_delete(test_smf);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user