Skip to content
Commit 54c623ba authored by Dan Nicholson's avatar Dan Nicholson Committed by Simon Feltman
Browse files

Handle multiple deinit of callable cache

In python3, it seems that the callable cache deinit can be called
multiple times when the program is exiting. Make that safer by clearing
the various pointers in the structure using g_clear_pointer and
Py_CLEAR. A subsequent call will skip all the deinit by seeing NULL
pointers for the members.

This was causing a critical warning when destroying the arg name hash
table multiple times with the following trivial program:

$ python3 -c 'from gi.repository import GLib; v = GLib.Variant("s", "foo")'

(process:32378): GLib-CRITICAL **: g_hash_table_destroy: assertion 'hash_table != NULL' failed

(process:32378): GLib-CRITICAL **: g_hash_table_destroy: assertion 'hash_table != NULL' failed

https://bugzilla.gnome.org/show_bug.cgi?id=776092
parent 94226b8e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment