mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
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
1 changed files with 3 additions and 1 deletions
|
|
@ -100,7 +100,9 @@ SMF::test(const std::string& path)
|
||||||
if (!test_smf) {
|
if (!test_smf) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (test_smf) {
|
||||||
smf_delete(test_smf);
|
smf_delete(test_smf);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue