From cc10a5259d01b3c994daeb3ccb2b4b24e9b7d0bd Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Mon, 8 Apr 2024 09:39:36 -0400 Subject: [PATCH] backend/libinput: avoid potential NULL access in wlr_libinput_get_device_handle --- backend/libinput/backend.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c index 6e59ee3e..c4dbc3d8 100644 --- a/backend/libinput/backend.c +++ b/backend/libinput/backend.c @@ -227,6 +227,8 @@ struct libinput_device *wlr_libinput_get_device_handle( dev = device_from_tablet_pad(wlr_tablet_pad_from_input_device(wlr_dev)); break; } + + assert(dev); return dev->handle; }