diff options
author | Alexandru Băluț <alexandru.balut@gmail.com> | 2020-01-20 21:30:14 +0100 |
---|---|---|
committer | Alexandru Băluț <alexandru.balut@gmail.com> | 2020-01-20 21:30:44 +0100 |
commit | c10c9856e4121b048f55a2c7b98a6fd8e8683c23 (patch) | |
tree | 9ecd8a7a2dd0548bed7e1904d4313e53fc376090 /gi | |
parent | d8c63d54a7496d8e25d5b0095e0095f8a8c5b802 (diff) | |
download | gobject-introspection-c10c9856e4121b048f55a2c7b98a6fd8e8683c23.tar.gz |
pygobject-object: Avoid checking whether NULL is floating
This issue was introduced in a102f046a178472278522e3e9d7c0b40ecd52ade.
Diffstat (limited to 'gi')
-rw-r--r-- | gi/pygobject-object.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gi/pygobject-object.c b/gi/pygobject-object.c index d411afbd..76b18ccc 100644 --- a/gi/pygobject-object.c +++ b/gi/pygobject-object.c @@ -1947,7 +1947,9 @@ pygobject_emit(PyGObject *self, PyObject *args) if (G_VALUE_HOLDS_OBJECT (&ret)) { GObject *obj = g_value_get_object (&ret); - was_floating = g_object_is_floating (obj); + if (obj != NULL && G_IS_OBJECT(obj)) { + was_floating = g_object_is_floating (obj); + } } py_ret = pyg_value_as_pyobject(&ret, TRUE); if (!was_floating) |