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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4059>
This commit is contained in:
parent
9d99f538d6
commit
0596ac25d2
1 changed files with 2 additions and 1 deletions
|
@ -2709,6 +2709,7 @@ 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));
|
||||
if (wacom_device)
|
||||
layout_path = libwacom_get_layout_filename (wacom_device);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue