diff --git a/src/backends/native/meta-seat-impl.c b/src/backends/native/meta-seat-impl.c index 0ecded4f7..d46318d6d 100644 --- a/src/backends/native/meta-seat-impl.c +++ b/src/backends/native/meta-seat-impl.c @@ -3920,8 +3920,13 @@ void meta_seat_impl_remove_virtual_input_device (MetaSeatImpl *seat_impl, ClutterInputDevice *device) { + g_autoptr (ClutterInputDevice) owned_device = NULL; ClutterEvent *device_event; + g_assert (CLUTTER_IS_INPUT_DEVICE (device)); + + owned_device = g_object_ref (device); + meta_seat_impl_remove_device (seat_impl, device); device_event = clutter_event_device_notify_new (CLUTTER_DEVICE_REMOVED,