From 446e13360dbaa95fd3912ebb9ca734ccb17d7a32 Mon Sep 17 00:00:00 2001 From: Simon Mikuda Date: Thu, 23 Mar 2023 11:28:57 +0100 Subject: [PATCH] monitor: Fix crash when there is no write handler --- monitor/att.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/att.c b/monitor/att.c index f9643b333..d3b82074f 100644 --- a/monitor/att.c +++ b/monitor/att.c @@ -2946,7 +2946,7 @@ static void print_write(const struct l2cap_frame *frame, uint16_t handle, return; handler = get_handler(attr); - if (!handler) + if (!handler || !handler->write) return; handler->write(frame); -- 2.47.3