From 511f4bbb6dd088cc32163edfe5004761a33a8311 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 24 Sep 2015 15:52:01 +0100 Subject: [PATCH] Fix possible null pointer dereference. --- src/lib/job.cc | 1 - src/lib/server.cc | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/job.cc b/src/lib/job.cc index c228defc5..439000e58 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -447,4 +447,3 @@ Job::when_finished (boost::signals2::connection& connection, function fi connection = Finished.connect (finished); } } - diff --git a/src/lib/server.cc b/src/lib/server.cc index c1db1e6ac..260f2e469 100644 --- a/src/lib/server.cc +++ b/src/lib/server.cc @@ -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. -- 2.30.2