Fix crash when testing invalid MIDI file.
[ardour.git] / libs / evoral / src / SMF.cpp
index 9bffa598050951392982ce721e1af984709f5603..64dd4e6889a483f4043709ef7a1cce8247576d50 100644 (file)
@@ -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;
 }