diff options
author | Robin Gareus <robin@gareus.org> | 2017-11-03 04:14:23 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-11-03 04:14:23 +0100 |
commit | c63f7f775d221359815b9b687a912e16c5645583 (patch) | |
tree | 2d30d367e5bd2691fc81874440efeeb96c82be67 /libs/ardour/auditioner.cc | |
parent | 0c041dc372ce5e1629da6ff158750945966888be (diff) |
Don't crash when auditioning empty .mid files.
Diffstat (limited to 'libs/ardour/auditioner.cc')
-rw-r--r-- | libs/ardour/auditioner.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc index a202fd8554..080a11703b 100644 --- a/libs/ardour/auditioner.cc +++ b/libs/ardour/auditioner.cc @@ -377,6 +377,11 @@ Auditioner::audition_region (boost::shared_ptr<Region> region) offset = the_region->sync_offset (dir); } + if (length == 0) { + error << _("Cannot audition empty file.") << endmsg; + return; + } + /* can't audition from a negative sync point */ if (dir < 0) { |