diff --git a/Assets/Scripts/Devices/Ble/mobile/BleMobileInterface.cs b/Assets/Scripts/Devices/Ble/mobile/BleMobileInterface.cs index 77ba356e..9d9b50bb 100644 --- a/Assets/Scripts/Devices/Ble/mobile/BleMobileInterface.cs +++ b/Assets/Scripts/Devices/Ble/mobile/BleMobileInterface.cs @@ -378,7 +378,7 @@ namespace Assets.Scripts.Ble { pCache.Clear(); _discoveredCallback = discoveredCallBack; - bleMobileThread.StartWatcher(); + bleMobileThread?.StartWatcher(); } public void StopScan() @@ -457,12 +457,10 @@ namespace Assets.Scripts.Ble { if (bleMobileThread == null) return; - bleMobileThread.ManagerInitialized -= BleMobileThread_ManagerInitialized; - bleMobileThread.ManagerStatusChanged -= ManagerStatusChanged; - bleMobileThread.ScanInfoReceived -= WatcherScanInfoReceived; + //bleMobileThread.ManagerInitialized -= BleMobileThread_ManagerInitialized; + //bleMobileThread.ManagerStatusChanged -= ManagerStatusChanged; + //bleMobileThread.ScanInfoReceived -= WatcherScanInfoReceived; bleMobileThread.Dispose(); - bleMobileThread = null; - hwInterface = null; pCache.Clear(); }