projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1698abc
)
Fix crash when testing invalid MIDI file.
author
Robin Gareus
<robin@gareus.org>
Thu, 26 Jul 2018 14:59:27 +0000
(16:59 +0200)
committer
Robin Gareus
<robin@gareus.org>
Thu, 26 Jul 2018 14:59:27 +0000
(16:59 +0200)
smf_delete() does not handle NULL pointers. This fixes a crash when
checking if a MIDI source is valid.
libs/evoral/src/SMF.cpp
patch
|
blob
|
history
diff --git
a/libs/evoral/src/SMF.cpp
b/libs/evoral/src/SMF.cpp
index 9bffa598050951392982ce721e1af984709f5603..64dd4e6889a483f4043709ef7a1cce8247576d50 100644
(file)
--- a/
libs/evoral/src/SMF.cpp
+++ b/
libs/evoral/src/SMF.cpp
@@
-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;
}