Diff between 044d567a4dd74f4f37bd0afdb41442750cef20a2 and f0fd6fdaa846cee1572e05d99fae5579c692ffc3

Changed Files

File Additions Deletions Status
profiles/input/hog_device.c +3 -0 modified

Full Patch

diff --git a/profiles/input/hog_device.c b/profiles/input/hog_device.c
index d231e00..994437f 100644
--- a/profiles/input/hog_device.c
+++ b/profiles/input/hog_device.c
@@ -573,6 +573,9 @@ static void forward_report(struct hog_device *hogdev,
 	DBG("Sending report type %d to device 0x%04X handle 0x%X", type,
 				hogdev->id, report->decl->value_handle);
 
+	if (hogdev->attrib == NULL)
+		return;
+
 	if (report->decl->properties & ATT_CHAR_PROPER_WRITE)
 		gatt_write_char(hogdev->attrib, report->decl->value_handle,
 				data, size, output_written_cb, hogdev);