summaryrefslogtreecommitdiff
path: root/src/lib
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 /src/lib
parentcaf1d26c4df515e1fd0f9b2758cd3a589079ff4b (diff)
Fix crash on 'report a problem' in the KDM creator.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/job.cc4
1 files changed, 2 insertions, 2 deletions
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)