wsd: assert valid socket where it counts

Change-Id: I19faa175066cab4e0435f6a8bf29e6b051c86420
Reviewed-on: https://gerrit.libreoffice.org/36330
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
Ashod Nakashian
2017-04-09 20:56:39 -04:00
committed by Ashod Nakashian
parent 679a39eb0b
commit cdb80e5632

View File

@ -272,12 +272,12 @@ public:
void removeSockets()
{
LOG_DBG("Removing all sockets from " << _name << ".");
assert(socket);
assertCorrectThread();
while (!_pollSockets.empty())
{
const std::shared_ptr<Socket>& socket = _pollSockets.back();
assert(socket);
LOG_DBG("Removing socket #" << socket->getFD() << " from " << _name);
socket->assertCorrectThread();