Fix crash with no Film.
authorCarl Hetherington <cth@carlh.net>
Wed, 7 Oct 2015 13:47:46 +0000 (14:47 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 9 Oct 2015 12:44:55 +0000 (13:44 +0100)
src/lib/job.cc

index 91581eb49550db343718606c5ede43ab249f6774..42d6160c773b4f744fcabaa8576063093795041c 100644 (file)
@@ -322,12 +322,12 @@ Job::error_summary () const
 void
 Job::set_error (string s, string d)
 {
-       LOG_ERROR_NC (s);
-       LOG_ERROR_NC (d);
-
        if (_film) {
+               LOG_ERROR_NC (s);
+               LOG_ERROR_NC (d);
                _film->log()->log (String::compose ("Error in job: %1 (%2)", s, d), Log::TYPE_ERROR);
        }
+
        boost::mutex::scoped_lock lm (_state_mutex);
        _error_summary = s;
        _error_details = d;