input-device: Do not pick() on NULL stages

If the stage associated to the InputDevice is not set we should
short-circuit out and return NULL. This will result in a pick()
done on the event's stage - if applicable.

http://bugzilla.moblin.org/show_bug.cgi?id=9602
This commit is contained in:
Emmanuele Bassi 2010-02-10 17:12:27 +00:00
parent 4208169ab4
commit d0734bc474

View File

@ -452,9 +452,11 @@ _clutter_input_device_update (ClutterInputDevice *device)
g_return_val_if_fail (device->device_type == CLUTTER_POINTER_DEVICE, NULL);
clutter_input_device_get_device_coords (device, &x, &y);
stage = device->stage;
if (stage == NULL)
return NULL;
clutter_input_device_get_device_coords (device, &x, &y);
old_cursor_actor = device->cursor_actor;
new_cursor_actor = _clutter_do_pick (stage, x, y, CLUTTER_PICK_REACTIVE);