summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-10-06 12:37:21 +0100
committerCarl Hetherington <cth@carlh.net>2015-10-09 13:44:50 +0100
commit1d4a1048c3fb6c19ba80efe7fa326e3e6685ec20 (patch)
tree316b405039d11ce5493845b578b882da0ef37886 /src
parent09c79795becef84621fc1ab411ee72f3d7bea950 (diff)
Allow _film to be 0.
Diffstat (limited to 'src')
-rw-r--r--src/lib/send_problem_report_job.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/lib/send_problem_report_job.cc b/src/lib/send_problem_report_job.cc
index b81b0439b..d0532a047 100644
--- a/src/lib/send_problem_report_job.cc
+++ b/src/lib/send_problem_report_job.cc
@@ -32,6 +32,7 @@ using std::string;
using std::list;
using boost::shared_ptr;
+/** @param film Film thta the problem is with, or 0 */
SendProblemReportJob::SendProblemReportJob (
shared_ptr<const Film> film,
string from,
@@ -47,6 +48,10 @@ SendProblemReportJob::SendProblemReportJob (
string
SendProblemReportJob::name () const
{
+ if (!_film) {
+ return _("Email problem report");
+ }
+
return String::compose (_("Email problem report for %1"), _film->name());
}
@@ -70,13 +75,15 @@ SendProblemReportJob::run ()
body += "Version: " + string (dcpomatic_version) + " " + string (dcpomatic_git_commit) + "\n\n";
- body += "log head and tail:\n";
- body += "---<8----\n";
- body += _film->log()->head_and_tail (4096);
- body += "---<8----\n\n";
+ if (_film) {
+ body += "log head and tail:\n";
+ body += "---<8----\n";
+ body += _film->log()->head_and_tail (4096);
+ body += "---<8----\n\n";
- add_file (body, "ffprobe.log");
- add_file (body, "metadata.xml");
+ add_file (body, "ffprobe.log");
+ add_file (body, "metadata.xml");
+ }
quickmail_set_body (mail, body.c_str());