Diff between 39a53c09a0c62cf221ff90a4228293cdfcd1f847 and 64bc96534bfdb4f32e1edff762ea108b68a47880

Changed Files

File Additions Deletions Status
emulator/bthost.c +4 -2 modified

Full Patch

diff --git a/emulator/bthost.c b/emulator/bthost.c
index c4603ae..3ff2a36 100644
--- a/emulator/bthost.c
+++ b/emulator/bthost.c
@@ -2070,6 +2070,8 @@ bool bthost_connect_rfcomm(struct bthost *bthost, uint16_t handle,
 
 void bthost_stop(struct bthost *bthost)
 {
-	smp_stop(bthost->smp_data);
-	bthost->smp_data = NULL;
+	if (bthost->smp_data) {
+		smp_stop(bthost->smp_data);
+		bthost->smp_data = NULL;
+	}
 }