From ad8c4c86744f9937e3939c70a051c8b1e07f6264 Mon Sep 17 00:00:00 2001 From: lishuo Date: Wed, 20 Jul 2022 15:04:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=87=BA=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E8=BF=9E=E6=8E=A5=E9=87=8A=E6=94=BE=E8=B5=84=E6=BA=90?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/Devices/Ble/mobile/BleMobileInterface.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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(); }