13
0

Don't crash when auditioning empty .mid files.

This commit is contained in:
Robin Gareus 2017-11-03 04:14:23 +01:00
parent 0c041dc372
commit c63f7f775d

View File

@ -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) {