aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/client.c4
-rw-r--r--libdbusmenu-glib/menuitem-proxy.c2
-rw-r--r--libdbusmenu-glib/server.c2
3 files changed, 8 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 588c940..1ee8641 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -1604,7 +1604,11 @@ about_to_show_cb (GObject * proxy, GAsyncResult * res, gpointer userdata)
void
dbusmenu_client_send_about_to_show(DbusmenuClient * client, gint id, void (*cb)(gpointer data), gpointer cb_data)
{
+ g_return_if_fail(DBUSMENU_CLIENT(client));
+ g_return_if_fail(id > 0);
+
DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client);
+ g_return_if_fail(priv != NULL);
about_to_show_t * data = g_new0(about_to_show_t, 1);
data->client = client;
diff --git a/libdbusmenu-glib/menuitem-proxy.c b/libdbusmenu-glib/menuitem-proxy.c
index ae6a334..fdbd892 100644
--- a/libdbusmenu-glib/menuitem-proxy.c
+++ b/libdbusmenu-glib/menuitem-proxy.c
@@ -188,6 +188,7 @@ proxy_item_child_added (DbusmenuMenuitem * parent, DbusmenuMenuitem * child, gui
DbusmenuMenuitemProxy * pmi = DBUSMENU_MENUITEM_PROXY(user_data);
DbusmenuMenuitemProxy * child_pmi = dbusmenu_menuitem_proxy_new(child);
dbusmenu_menuitem_child_add_position(DBUSMENU_MENUITEM(pmi), DBUSMENU_MENUITEM(child_pmi), position);
+ g_object_unref (child_pmi);
return;
}
@@ -283,6 +284,7 @@ add_menuitem (DbusmenuMenuitemProxy * pmi, DbusmenuMenuitem * mi)
for (child = children; child != NULL; child = g_list_next(child)) {
DbusmenuMenuitemProxy * child_pmi = dbusmenu_menuitem_proxy_new(DBUSMENU_MENUITEM(child->data));
dbusmenu_menuitem_child_append(DBUSMENU_MENUITEM(pmi), DBUSMENU_MENUITEM(child_pmi));
+ g_object_unref (child_pmi);
}
return;
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index c7057df..9c085f7 100644
--- a/libdbusmenu-glib/server.c
+++ b/libdbusmenu-glib/server.c
@@ -1194,7 +1194,9 @@ error_quark (void)
static void
bus_get_layout (DbusmenuServer * server, GVariant * params, GDBusMethodInvocation * invocation)
{
+ g_return_if_fail(DBUSMENU_IS_SERVER(server));
DbusmenuServerPrivate * priv = DBUSMENU_SERVER_GET_PRIVATE(server);
+ g_return_if_fail(priv != NULL);
/* Input */
gint32 parent;