diff --git a/glib/sailfishaccesscontrol.c b/glib/sailfishaccesscontrol.c
index a9221a8..fe8e5e5 100644
--- a/glib/sailfishaccesscontrol.c
+++ b/glib/sailfishaccesscontrol.c
@@ -92,7 +92,7 @@ bool sailfish_access_control_hasgroup(uid_t uid, const char *group_name)
     ensure_groups_validity();
 
     if (!s_groups)
-        s_groups = g_hash_table_new_full(NULL, NULL, NULL, destroy_group_list);
+        s_groups = g_hash_table_new_full(NULL, NULL, NULL, (GDestroyNotify)destroy_group_list);
 
     groups = g_hash_table_lookup(s_groups, GINT_TO_POINTER(uid));
     if (!groups)
