summaryrefslogtreecommitdiff
path: root/src/lib/server.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-09-24 15:52:01 +0100
committerCarl Hetherington <cth@carlh.net>2015-09-24 15:52:01 +0100
commit511f4bbb6dd088cc32163edfe5004761a33a8311 (patch)
tree08cfa540cc5d381d170ce4ec00fedb0d07811105 /src/lib/server.cc
parent0063dcb039b34ff78d98b7c6ac24f75a27eb347e (diff)
Fix possible null pointer dereference.
Diffstat (limited to 'src/lib/server.cc')
-rw-r--r--src/lib/server.cc4
1 files changed, 3 insertions, 1 deletions
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.