gobject: Fix crash when disposing a GtkAccelGroup

This is a partial revert of commit fa8c7c0da using the approach
suggested (and tested) by Kjell Ahlstedt.

It is intended to be temporary pending a proper dig into what’s causing
the regression, just so we can get the 2.73.1 release out.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2672
This commit is contained in:
Philip Withnall 2022-06-20 16:32:00 +01:00
parent 150a63e6b5
commit 01ac1d902f

View File

@ -1360,7 +1360,10 @@ g_object_real_dispose (GObject *object)
}; };
g_signal_handlers_destroy (object); g_signal_handlers_destroy (object);
g_datalist_id_remove_multiple (&object->qdata, keys, G_N_ELEMENTS (keys)); /* FIXME: This should be simplified down to a single remove_multiple() call.
* See https://gitlab.gnome.org/GNOME/glib/-/issues/2672 */
g_datalist_id_remove_multiple (&object->qdata, keys, 1);
g_datalist_id_remove_multiple (&object->qdata, keys + 1, 2);
} }
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG