Fronius: Fix a crash when the discovery times out

master
Michael Zanetti 2022-08-08 15:09:15 +02:00
parent 860fbac0e8
commit ef5058e837
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ void IntegrationPluginFronius::discoverThings(ThingDiscoveryInfo *info)
qCDebug(dcFronius()) << "Starting network discovery...";
NetworkDeviceDiscoveryReply *discoveryReply = hardwareManager()->networkDeviceDiscovery()->discover();
connect(discoveryReply, &NetworkDeviceDiscoveryReply::finished, this, [=](){
connect(discoveryReply, &NetworkDeviceDiscoveryReply::finished, info, [=](){
ThingDescriptors descriptors;
qCDebug(dcFronius()) << "Discovery finished. Found" << discoveryReply->networkDeviceInfos().count() << "devices";
foreach (const NetworkDeviceInfo &networkDeviceInfo, discoveryReply->networkDeviceInfos()) {