From 980bab5135643f5fc1e43ef3e9080ffe1e5922fd Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Fri, 30 Jul 2021 15:49:27 +0200 Subject: [PATCH] device: Do not use GLib 2.58 API to pop from GPtrArray We currently only depend on GLib 2.52. --- src/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 155f659..6f01d9c 100644 --- a/src/device.c +++ b/src/device.c @@ -1506,7 +1506,9 @@ fprint_device_verify_start (FprintDBusDevice *dbus_dev, if (gallery) { - print = g_ptr_array_steal_index_fast (gallery, 0); + /* TODO: Use g_ptr_array_remove_index_fast with GLib >= 2.58 */ + print = g_object_ref (g_ptr_array_index (gallery, 0)); + g_ptr_array_remove_index_fast (gallery, 0); finger = fp_print_get_finger (print); } else