From 671eee9ef5f22f5043e58973a8e001a07cc697eb Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 11 Mar 2019 21:05:14 +0000 Subject: Missing part of previous commit. --- src/lib/encode_server.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/lib/encode_server.cc') diff --git a/src/lib/encode_server.cc b/src/lib/encode_server.cc index d31760c0d..16c65dba7 100644 --- a/src/lib/encode_server.cc +++ b/src/lib/encode_server.cc @@ -313,10 +313,12 @@ EncodeServer::broadcast_received () } boost::mutex::scoped_lock lm (_broadcast.mutex); - _broadcast.socket->async_receive_from ( - boost::asio::buffer (_broadcast.buffer, sizeof (_broadcast.buffer)), - _broadcast.send_endpoint, boost::bind (&EncodeServer::broadcast_received, this) - ); + if (_broadcast.socket) { + _broadcast.socket->async_receive_from ( + boost::asio::buffer (_broadcast.buffer, sizeof (_broadcast.buffer)), + _broadcast.send_endpoint, boost::bind (&EncodeServer::broadcast_received, this) + ); + } } void -- cgit v1.2.3