Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4696b6c

Browse files
committed
Update IntelCtlLibraryPlugin.cs
1 parent 2815bdb commit 4696b6c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

IntelCtlLibraryPlugin.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ public void Close()
1515
{
1616
_disposable?.Dispose();
1717
_disposable = null;
18-
CtlLibrary.ctlClose(_apiHandle).ThrowIfError("Close");
18+
19+
if (_apiHandle != null)
20+
{
21+
CtlLibrary.ctlClose(_apiHandle).ThrowIfError("Close");
22+
_apiHandle = null;
23+
}
1924
}
2025

2126
public void Initialize()
@@ -28,7 +33,6 @@ public void Initialize()
2833
{
2934
_apiHandle = CtlLibrary.ctl_api_handle_t_PtrPtr_value(handlePtr);
3035
}
31-
3236
}
3337

3438
public void Load(IPluginSensorsContainer _container)

0 commit comments

Comments
 (0)