types/wlr_input_device: name maybe NULL

Signed-off-by: xurui <xurui@kylinos.cn>
This commit is contained in:
xurui 2025-11-04 17:21:53 +08:00
parent 604fcdb1db
commit 47d0a90274

View file

@ -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);