From a009221092c52d295b0c415a8bcf97498247a3e4 Mon Sep 17 00:00:00 2001 From: peri4 Date: Thu, 30 Sep 2021 16:21:28 +0300 Subject: [PATCH] pidisconnect now work with lambdas --- libs/main/core/piobject.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/main/core/piobject.cpp b/libs/main/core/piobject.cpp index 2da587df..b4a09568 100644 --- a/libs/main/core/piobject.cpp +++ b/libs/main/core/piobject.cpp @@ -390,10 +390,10 @@ void PIObject::piDisconnect(PIObject * src, const PIString & sig) { __Connection & cc(src->connections[i]); if (cc.event == sig) { PIObject * dest = cc.dest_o; - if (!dest) { - src->connections[i].destroy(); - src->connections.remove(i); - i--; + src->connections[i].destroy(); + src->connections.remove(i); + i--; + if (dest) { #if !defined(ANDROID) && !defined(MAC_OS) && !defined(FREERTOS) PIMutexLocker _mld(dest->mutex_connect, src != dest); #endif