diff options
author | Robin Gareus <robin@gareus.org> | 2018-11-20 00:38:18 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-11-20 00:44:40 +0100 |
commit | cdc5b88c91541f70de57c196570e12ee05a14af9 (patch) | |
tree | df6fc54367cfc677bf576cd8e099b83377387e5f /gtk2_ardour/export_report.cc | |
parent | 731a745c1c32d553a327146bca6822c792d0e156 (diff) |
Handle port-export report of unplayable files
Diffstat (limited to 'gtk2_ardour/export_report.cc')
-rw-r--r-- | gtk2_ardour/export_report.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk2_ardour/export_report.cc b/gtk2_ardour/export_report.cc index 0c7270db72..52a5dae0cc 100644 --- a/gtk2_ardour/export_report.cc +++ b/gtk2_ardour/export_report.cc @@ -182,10 +182,14 @@ ExportReport::init (const AnalysisResults & ar, bool with_file) clock->set (info.timecode * src_coef + 0.5, true); t->attach (*clock, 3, 4, 3, 4); } else if (with_file) { - l = manage (new Label (_("Error:"), ALIGN_END)); - t->attach (*l, 0, 1, 1, 2); - l = manage (new Label (errmsg, ALIGN_START)); - t->attach (*l, 1, 4, 1, 2); + with_file = false; + /* Note: errmsg can have size = 1, and contain "\0\0" */ + if (!errmsg.empty() && 0 != strlen(errmsg.c_str())) { + l = manage (new Label (_("Error:"), ALIGN_END)); + t->attach (*l, 0, 1, 1, 2); + l = manage (new Label (errmsg, ALIGN_START)); + t->attach (*l, 1, 4, 1, 2); + } } int w, h; |