input: Add a check on the argument
This commit is contained in:
parent
23e8e43d66
commit
251d3b545e
@ -1421,9 +1421,10 @@ _clutter_input_device_select_stage_events (ClutterInputDevice *device,
|
|||||||
* equivalent evdev keycode. Note that depending on the input backend
|
* equivalent evdev keycode. Note that depending on the input backend
|
||||||
* used by Clutter this function can fail if there is no obvious
|
* used by Clutter this function can fail if there is no obvious
|
||||||
* mapping between the key codes. The hardware keycode can be taken
|
* mapping between the key codes. The hardware keycode can be taken
|
||||||
* from the hardware_keycode member of #ClutterKeyEvent.
|
* from the #ClutterKeyEvent.hardware_keycode member of #ClutterKeyEvent.
|
||||||
*
|
*
|
||||||
* Return value: %TRUE if the conversion succeeded, %FALSE otherwise.
|
* Return value: %TRUE if the conversion succeeded, %FALSE otherwise.
|
||||||
|
*
|
||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
@ -1433,6 +1434,8 @@ clutter_input_device_keycode_to_evdev (ClutterInputDevice *device,
|
|||||||
{
|
{
|
||||||
ClutterInputDeviceClass *device_class;
|
ClutterInputDeviceClass *device_class;
|
||||||
|
|
||||||
|
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), FALSE);
|
||||||
|
|
||||||
device_class = CLUTTER_INPUT_DEVICE_GET_CLASS (device);
|
device_class = CLUTTER_INPUT_DEVICE_GET_CLASS (device);
|
||||||
if (device_class->keycode_to_evdev == NULL)
|
if (device_class->keycode_to_evdev == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user