diff --git a/src/backends/x11/meta-input-device-x11.c b/src/backends/x11/meta-input-device-x11.c index 32aa9b4a3..7bc089eb7 100644 --- a/src/backends/x11/meta-input-device-x11.c +++ b/src/backends/x11/meta-input-device-x11.c @@ -737,6 +737,10 @@ pad_switch_mode (ClutterInputDevice *device, wacom_device = meta_input_device_get_wacom_device (META_INPUT_DEVICE (device)); + + if (!wacom_device) + return FALSE; + n_buttons = libwacom_get_num_buttons (wacom_device); for (i = 0; i < n_buttons; i++)