mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 02:32:11 +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,
|
||||
{
|
||||
G_LOCK (debug_objects);
|
||||
g_assert (g_hash_table_contains (debug_objects_ht, object));
|
||||
g_hash_table_remove (debug_objects_ht, object);
|
||||
debug_objects_count--;
|
||||
G_UNLOCK (debug_objects);
|
||||
@ -3345,7 +3344,7 @@ g_object_unref (gpointer _object)
|
||||
{
|
||||
/* catch objects not chaining finalize handlers */
|
||||
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_type_free_instance ((GTypeInstance*) object);
|
||||
|
Loading…
x
Reference in New Issue
Block a user