Fix some coverity-reported stuff.
[dcpomatic.git] / src / lib / writer.cc
index c2a6c981bc8f31a2629affe444df88c225ae7ddc..42187dc6e78616a24673057bb4e9eb87802381aa 100644 (file)
@@ -541,7 +541,9 @@ Writer::check_existing_picture_mxf ()
                shared_ptr<Job> job = _job.lock ();
                assert (job);
 
-               job->set_progress (float (_first_nonexistant_frame) / N);
+               if (N > 0) {
+                       job->set_progress (float (_first_nonexistant_frame) / N);
+               }
 
                if (_film->three_d ()) {
                        if (!check_existing_picture_mxf_frame (mxf, _first_nonexistant_frame, EYES_LEFT)) {