diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-04-20 22:46:39 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-04-20 22:46:39 -0400 |
commit | 63ac1b1464bf5adb2813a6a1b5cb1657ecdf2c53 (patch) | |
tree | be6fc408013a9df9d2493eac16a10442cbfede23 /libs/evoral/src/SMF.cpp | |
parent | 67411281ad27966f84b4d4b2d8516a78f817f943 (diff) |
SMF::end_write() is a no-op if there is no _smf structure
Diffstat (limited to 'libs/evoral/src/SMF.cpp')
-rw-r--r-- | libs/evoral/src/SMF.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/evoral/src/SMF.cpp b/libs/evoral/src/SMF.cpp index c4e06823a9..b6ec8ecba7 100644 --- a/libs/evoral/src/SMF.cpp +++ b/libs/evoral/src/SMF.cpp @@ -400,6 +400,11 @@ void SMF::end_write(string const & path) THROW_FILE_ERROR { Glib::Threads::Mutex::Lock lm (_smf_lock); + + if (!_smf) { + return; + } + FILE* f = fopen (path.c_str(), "w+"); if (f == 0) { throw FileError (path); |