Skip to content

Commit 1aef4b1

Browse files
author
Jasper van Bourgognie
committed
InterfaceManagerZeroConf: Allow Destroy() to be called before init
1 parent 87a7956 commit 1aef4b1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Hardware/InterfaceManagerZeroConf.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Text;
@@ -132,7 +132,9 @@ public override void PollDevice()
132132
public void Destroy()
133133
{
134134
pollThreadRunning = false;
135-
pollThread.Join(1000);
135+
if(pollThread != null)
136+
pollThread.Join(1000);
137+
136138
}
137139

138140
private void OnInterfaceDisconnect(SmartScopeInterfaceEthernet hardwareInterface)

0 commit comments

Comments
 (0)