Commit a06e0d02 authored by Daniel Narvaez's avatar Daniel Narvaez Committed by Martin Pitt
Browse files

Fix crash with GLib.child_watch_add

Was sometimes crashing when the destroy notify was called.

https://bugzilla.gnome.org/show_bug.cgi?id=688067
parent 702fe63f
......@@ -351,9 +351,15 @@ static void
child_watch_dnotify(gpointer data)
{
struct _PyGChildData *child_data = (struct _PyGChildData *) data;
PyGILState_STATE gil;
gil = pyglib_gil_state_ensure();
Py_DECREF(child_data->func);
Py_XDECREF(child_data->data);
g_slice_free(struct _PyGChildData, child_data);
pyglib_gil_state_release(gil);
}
......
Supports Markdown
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