summaryrefslogtreecommitdiff
path: root/libgjs-private
diff options
context:
space:
mode:
authorAdam Williamson <awilliam@redhat.com>2020-08-28 13:33:04 -0700
committerAdam Williamson <awilliam@redhat.com>2020-08-28 13:33:04 -0700
commitdc15ab81baf589a071b241da90e2ee83c83baef3 (patch)
tree4a58b8a75ff2ccb0b2630bda86dfb5f305cb5998 /libgjs-private
parenta8506503af51020c10877572fc68789d83e69c3e (diff)
downloadgjs-dc15ab81baf589a071b241da90e2ee83c83baef3.tar.gz
gjs_dbus_implementation_emit_signal: don't try to unref NULL
07221d6d (which added support for multiple bus connections) added a `g_variant_unref(parameters)` call here, but it needs to only be done if `parameters` is not `NULL`. This was causing frequent "g_variant_unref: assertion 'value != NULL' failed" errors in the journal, see https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3102 . Signed-off-by: Adam Williamson <awilliam@redhat.com>
Diffstat (limited to 'libgjs-private')
-rw-r--r--libgjs-private/gjs-gdbus-wrapper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libgjs-private/gjs-gdbus-wrapper.c b/libgjs-private/gjs-gdbus-wrapper.c
index f7361366..eb0516f9 100644
--- a/libgjs-private/gjs-gdbus-wrapper.c
+++ b/libgjs-private/gjs-gdbus-wrapper.c
@@ -395,7 +395,9 @@ gjs_dbus_implementation_emit_signal (GjsDBusImplementation *self,
g_object_unref(iter->data);
}
- g_variant_unref(parameters);
+ if (parameters != NULL)
+ g_variant_unref(parameters);
+
g_list_free(connections);
}