aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-06-18 15:28:54 -0500
committerTed Gould <ted@canonical.com>2009-06-18 15:28:54 -0500
commita0ba99c7840a0db2eb957138854050060221a8df (patch)
tree10f1dc999183d1c7dd8cd2b5fada04e0b1ad4d60 /libdbusmenu-glib
parentc00751c9a6bc7c1dfeb6a09ec217a211165703bd (diff)
downloadlibdbusmenu-a0ba99c7840a0db2eb957138854050060221a8df.tar.gz
libdbusmenu-a0ba99c7840a0db2eb957138854050060221a8df.tar.bz2
libdbusmenu-a0ba99c7840a0db2eb957138854050060221a8df.zip
Handling the concept of not having a property proxy.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/client.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 61f8c34..ea77cc3 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -499,6 +499,10 @@ update_layout (DbusmenuClient * client)
{
DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client);
+ if (priv->propproxy == NULL) {
+ return;
+ }
+
if (priv->layoutcall != NULL) {
return;
}
@@ -554,7 +558,8 @@ dbusmenu_client_new (const gchar * name, const gchar * object)
it could block longer.
Return value: A #DbusmenuMenuitem representing the root of
- menu on the server.
+ menu on the server. If there is no server or there is
+ an error receiving its layout it'll return #NULL.
*/
DbusmenuMenuitem *
dbusmenu_client_get_root (DbusmenuClient * client)
@@ -563,6 +568,10 @@ dbusmenu_client_get_root (DbusmenuClient * client)
DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client);
+ if (priv->propproxy == NULL) {
+ return NULL;
+ }
+
if (priv->layoutcall != NULL) {
/* Will end the current call and block on it's completion */
update_layout_cb(priv->propproxy, priv->layoutcall, client);