diff --git a/test/litest.c b/test/litest.c index 4f26771f..d34bd3c5 100644 --- a/test/litest.c +++ b/test/litest.c @@ -1341,8 +1341,8 @@ litest_delete_device(struct litest_device *d) litest_assert_int_eq(d->skip_ev_syn, 0); if (d->libinput_device) { - libinput_device_unref(d->libinput_device); libinput_path_remove_device(d->libinput_device); + libinput_device_unref(d->libinput_device); } if (d->owns_context) libinput_unref(d->libinput);