Diff between bdf36141b058f078148bef08587e485909efc212 and ebf2d7935690c00c7fd12768177e2023fc63c9fe

Changed Files

File Additions Deletions Status
src/gatt-client.c +1 -4 modified

Full Patch

diff --git a/src/gatt-client.c b/src/gatt-client.c
index de18bea..6ee984d 100644
--- a/src/gatt-client.c
+++ b/src/gatt-client.c
@@ -883,10 +883,7 @@ static gboolean characteristic_get_mtu(const GDBusPropertyTable *property,
 	uint16_t mtu;
 
 	att = bt_gatt_client_get_att(gatt);
-	if (!att)
-		return FALSE;
-
-	mtu = bt_att_get_mtu(att);
+	mtu = att ? bt_att_get_mtu(att) : BT_ATT_DEFAULT_LE_MTU;
 
 	dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT16, &mtu);