mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 18:52:09 +01:00
gobject: Don't crash if debug hash doesn't match expectations
At the moment if a GObject fails to chain up to finalize the object won't get removed from the hash at finalize time. This commit drops the assertions.
This commit is contained in:
parent
eddb95d591
commit
64423c96fd
@ -1064,7 +1064,6 @@ g_object_finalize (GObject *object)
|
|||||||
GOBJECT_IF_DEBUG (OBJECTS,
|
GOBJECT_IF_DEBUG (OBJECTS,
|
||||||
{
|
{
|
||||||
G_LOCK (debug_objects);
|
G_LOCK (debug_objects);
|
||||||
g_assert (g_hash_table_contains (debug_objects_ht, object));
|
|
||||||
g_hash_table_remove (debug_objects_ht, object);
|
g_hash_table_remove (debug_objects_ht, object);
|
||||||
debug_objects_count--;
|
debug_objects_count--;
|
||||||
G_UNLOCK (debug_objects);
|
G_UNLOCK (debug_objects);
|
||||||
@ -3345,7 +3344,7 @@ g_object_unref (gpointer _object)
|
|||||||
{
|
{
|
||||||
/* catch objects not chaining finalize handlers */
|
/* catch objects not chaining finalize handlers */
|
||||||
G_LOCK (debug_objects);
|
G_LOCK (debug_objects);
|
||||||
g_assert (!g_hash_table_contains (debug_objects_ht, object));
|
g_hash_table_remove (debug_objects_ht, object);
|
||||||
G_UNLOCK (debug_objects);
|
G_UNLOCK (debug_objects);
|
||||||
});
|
});
|
||||||
g_type_free_instance ((GTypeInstance*) object);
|
g_type_free_instance ((GTypeInstance*) object);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user