Fix possible null pointer dereference.
authorCarl Hetherington <cth@carlh.net>
Thu, 24 Sep 2015 14:52:01 +0000 (15:52 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 24 Sep 2015 14:52:01 +0000 (15:52 +0100)
src/lib/job.cc
src/lib/server.cc

index c228defc541737542c67b5f08045a428b16d849c..439000e5876dcc61b061c8ddbfdf6645be026905 100644 (file)
@@ -447,4 +447,3 @@ Job::when_finished (boost::signals2::connection& connection, function<void()> fi
                connection = Finished.connect (finished);
        }
 }
-
index c1db1e6ac866d632c62aead5cd71986875a13151..260f2e469aeacad2bfd39d71030e05c28e50dc72 100644 (file)
@@ -89,7 +89,9 @@ Server::~Server ()
        _io_service.stop ();
 
        _broadcast.io_service.stop ();
-       _broadcast.thread->join ();
+       if (_broadcast.thread) {
+               _broadcast.thread->join ();
+       }
 }
 
 /** @param after_read Filled in with gettimeofday() after reading the input from the network.