mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Fix access violations on exit with Overlay active
* Prevent duplicate object deletion triggered by disconnect signal upon us deleting an overlay client.
This commit is contained in:
parent
de27cd7b72
commit
3282887fca
@ -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() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user