Diff between bc1b1717bf93ccddfaed0a680fb17188eafaae1f and ce57fdeb2ff6b7ffd93c781d2f3474e8076e2cb5

Changed Files

File Additions Deletions Status
src/device.c +2 -1 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index 307b15e..e811811 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4050,7 +4050,8 @@ void device_remove(struct btd_device *device, gboolean remove_stored)
 	device->pending = NULL;
 
 	if (btd_device_is_connected(device)) {
-		g_source_remove(device->disconn_timer);
+		if (device->disconn_timer > 0)
+			g_source_remove(device->disconn_timer);
 		disconnect_all(device);
 	}