From d46352b23ffc0cf43eaa7c636bb125aeb000b4c7 Mon Sep 17 00:00:00 2001 From: Jason Gerecke Date: Tue, 1 Oct 2024 14:50:54 -0700 Subject: [PATCH] display: Do not crash attempting to display OSD for unknown Wacom device The gnome-control-center has recently allowed unknown tablets to appear in its UI. The UI provides a "Map Buttons" button that tries to open the OSD, but if a device is not known there may be no Wacom object to actually act on. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3722 Part-of: --- src/core/display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/display.c b/src/core/display.c index 8a86d3736..7fb093ea7 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -2709,7 +2709,8 @@ meta_display_request_pad_osd (MetaDisplay *display, meta_input_mapper_get_device_logical_monitor (input_mapper, pad); #ifdef HAVE_LIBWACOM wacom_device = meta_input_device_get_wacom_device (META_INPUT_DEVICE (pad)); - layout_path = libwacom_get_layout_filename (wacom_device); + if (wacom_device) + layout_path = libwacom_get_layout_filename (wacom_device); #endif }