Skip to content
Permalink
Browse files

Fix access violations on exit with Overlay active

* Prevent duplicate object deletion triggered by disconnect signal upon us
deleting an overlay client.
  • Loading branch information...
Kissaki committed May 14, 2015
1 parent de27cd7 commit 3282887fca59509a3ace6ab5cfd0f21e97e159bd
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/mumble/Overlay.cpp
@@ -128,7 +128,14 @@ Overlay::~Overlay() {

// Need to be deleted first, since destructor references lingering QLocalSockets
foreach(OverlayClient *oc, qlClients)
{
// As we're the one closing the connection, we do not need to be
// notified of disconnects. This is important because on disconnect we
// also remove (and 'delete') the overlay client.
disconnect(oc->qlsSocket, SIGNAL(disconnected()), this, SLOT(disconnected()));
disconnect(oc->qlsSocket, SIGNAL(error(QLocalSocket::LocalSocketError)), this, SLOT(error(QLocalSocket::LocalSocketError)));
delete oc;
}
}

void Overlay::newConnection() {

0 comments on commit 3282887

Please sign in to comment.
You can’t perform that action at this time.