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
c215faaeef
commit
d46352b23f
@ -2709,7 +2709,8 @@ meta_display_request_pad_osd (MetaDisplay *display,
|
|||||||
meta_input_mapper_get_device_logical_monitor (input_mapper, pad);
|
meta_input_mapper_get_device_logical_monitor (input_mapper, pad);
|
||||||
#ifdef HAVE_LIBWACOM
|
#ifdef HAVE_LIBWACOM
|
||||||
wacom_device = meta_input_device_get_wacom_device (META_INPUT_DEVICE (pad));
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user