summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-12-06 10:37:08 -0500
committerDavid Robillard <d@drobilla.net>2014-12-06 10:37:08 -0500
commit2e92ae90a661bfadfbbe06315c3eeea05314436b (patch)
treeb68ffec86dbe96ccb6353fd16b66b5b7c413a04c /libs
parent2a28345bab12dcae6973c843855c8425d25229db (diff)
Possible half-fix for SMF crash.
Diffstat (limited to 'libs')
-rw-r--r--libs/evoral/src/SMF.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/evoral/src/SMF.cpp b/libs/evoral/src/SMF.cpp
index 047763723e..b75141d7fb 100644
--- a/libs/evoral/src/SMF.cpp
+++ b/libs/evoral/src/SMF.cpp
@@ -212,7 +212,11 @@ void
SMF::seek_to_start() const
{
Glib::Threads::Mutex::Lock lm (_smf_lock);
- _smf_track->next_event_number = 1;
+ if (_smf_track) {
+ _smf_track->next_event_number = 1;
+ } else {
+ cerr << "WARNING: SMF seek_to_start() with no track" << endl;
+ }
}
/** Read an event from the current position in file.