summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-09-28 11:15:57 +0100
committerCarl Hetherington <cth@carlh.net>2016-09-28 11:15:57 +0100
commitf233320c6c3bfe887eebd075ac1edd16bdc8531a (patch)
tree9193116444b2dfa1d11dd8f5645471ef679d06f1
parentcaf1d26c4df515e1fd0f9b2758cd3a589079ff4b (diff)
Fix crash on 'report a problem' in the KDM creator.
-rw-r--r--ChangeLog4
-rw-r--r--src/lib/job.cc4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c4bd566d3..ad3447b9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-09-28 c.hetherington <cth@carlh.net>
+
+ * Fix crash on "report a problem" in the KDM creator.
+
2016-09-27 Carl Hetherington <cth@carlh.net>
* Updated ru_RU translation from Igor Voytovich.
diff --git a/src/lib/job.cc b/src/lib/job.cc
index ed0370479..51deca404 100644
--- a/src/lib/job.cc
+++ b/src/lib/job.cc
@@ -45,8 +45,8 @@ using boost::shared_ptr;
using boost::optional;
using boost::function;
-#define LOG_ERROR_NC(...) _film->log()->log (__VA_ARGS__, LogEntry::TYPE_ERROR);
-#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL);
+#define LOG_ERROR_NC(...) if (_film) { _film->log()->log (__VA_ARGS__, LogEntry::TYPE_ERROR); }
+#define LOG_GENERAL(...) if (_film) { _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL); }
/** @param film Associated film, or 0 */
Job::Job (shared_ptr<const Film> film)