From b1de77c63d32942a10b66a837e30cf8cb6b81dad Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Wed, 6 Apr 2022 13:43:56 +0200 Subject: [PATCH] fix a crash on removal --- schrack/integrationpluginschrack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schrack/integrationpluginschrack.cpp b/schrack/integrationpluginschrack.cpp index d90bfed..211e8a4 100644 --- a/schrack/integrationpluginschrack.cpp +++ b/schrack/integrationpluginschrack.cpp @@ -208,7 +208,7 @@ void IntegrationPluginSchrack::postSetupThing(Thing *thing) // We'll not actually evaluate the actual results in here because // this piece of code should be replaced with the modbus tool internal connected detection when it's ready ModbusRtuReply *reply = connection->readCpSignalState(); - connect(reply, &ModbusRtuReply::finished, [reply, thing](){ + connect(reply, &ModbusRtuReply::finished, thing, [reply, thing](){ qCDebug(dcSchrack) << "CP signal state reply finished" << reply->error(); thing->setStateValue(cionConnectedStateTypeId, reply->error() == ModbusRtuReply::NoError); });