diff options
Diffstat (limited to 'src/lib/writer.cc')
| -rw-r--r-- | src/lib/writer.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 58b2b8a91..9c4a194e8 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -147,9 +147,14 @@ Writer::Writer (shared_ptr<const Film> film, weak_ptr<Job> j) throw InvalidSignerError (); } - _thread = new boost::thread (boost::bind (&Writer::thread, this)); - job->sub (_("Encoding image data")); + + /* Do this last; if something after this line were to throw an exception + (say if Job::sub was interrupted by cancel) this thread would never + get properly cleaned up but the Writer object would go away underneath + it. + */ + _thread = new boost::thread (boost::bind (&Writer::thread, this)); } Writer::~Writer () |
