Don't crash when auditioning empty .mid files.
This commit is contained in:
parent
0c041dc372
commit
c63f7f775d
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user