Diff between 717d36fbb82fb428a0dcf1d9eaa0053efae1035f and 4ce066c4063d55bc657f9e53e7db27170533cf73

Changed Files

File Additions Deletions Status
profiles/input/device.c +5 -0 modified

Full Patch

diff --git a/profiles/input/device.c b/profiles/input/device.c
index 6b5a290..cfa5e23 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
@@ -149,6 +149,11 @@ static bool hidp_send_message(GIOChannel *chan, uint8_t hdr,
 	ssize_t len;
 	uint8_t msg[size + 1];
 
+	if (!chan) {
+		error("BT socket not connected");
+		return false;
+	}
+
 	if (data == NULL)
 		size = 0;