Diff between 889b97e685354811553ff05132957eb31eea8b4a and b809cae2368e5ad0bed46e9be7afef99fed80786

Changed Files

File Additions Deletions Status
profiles/network/connection.c +4 -2 modified

Full Patch

diff --git a/profiles/network/connection.c b/profiles/network/connection.c
index 59423a9..e8ac643 100644
--- a/profiles/network/connection.c
+++ b/profiles/network/connection.c
@@ -207,8 +207,10 @@ static gboolean bnep_setup_cb(GIOChannel *chan, GIOCondition cond,
 	if (cond & G_IO_NVAL)
 		return FALSE;
 
-	g_source_remove(nc->timeout_source);
-	nc->timeout_source = 0;
+	if (nc->timeout_source > 0) {
+		g_source_remove(nc->timeout_source);
+		nc->timeout_source = 0;
+	}
 
 	if (cond & (G_IO_HUP | G_IO_ERR)) {
 		error("Hangup or error on l2cap server socket");