From 47d0a90274be1c1ab3cb75fe741c9e2a98e781b4 Mon Sep 17 00:00:00 2001 From: xurui Date: Tue, 4 Nov 2025 17:21:53 +0800 Subject: [PATCH] types/wlr_input_device: name maybe NULL Signed-off-by: xurui --- types/wlr_input_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/wlr_input_device.c b/types/wlr_input_device.c index 8d6301589..201059db8 100644 --- a/types/wlr_input_device.c +++ b/types/wlr_input_device.c @@ -7,7 +7,7 @@ void wlr_input_device_init(struct wlr_input_device *dev, enum wlr_input_device_type type, const char *name) { *dev = (struct wlr_input_device){ .type = type, - .name = strdup(name), + .name = name ? strdup(name) : NULL, }; wl_signal_init(&dev->events.destroy);