aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-06-28 12:55:51 -0500
committerTed Gould <ted@gould.cx>2010-06-28 12:55:51 -0500
commita2d820e83b57e71a0b1305b52b1aff8162d6930d (patch)
tree8827bb4015986739f73cf335ba16c6c9a5970449
parentaea8d2664195b8d5b6b77817a70c5955f9f32a8c (diff)
downloadlibdbusmenu-a2d820e83b57e71a0b1305b52b1aff8162d6930d.tar.gz
libdbusmenu-a2d820e83b57e71a0b1305b52b1aff8162d6930d.tar.bz2
libdbusmenu-a2d820e83b57e71a0b1305b52b1aff8162d6930d.zip
Adding an explicit null check.
-rw-r--r--tools/dbusmenu-dumper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/dbusmenu-dumper.c b/tools/dbusmenu-dumper.c
index f0f4ba0..f2e2bec 100644
--- a/tools/dbusmenu-dumper.c
+++ b/tools/dbusmenu-dumper.c
@@ -108,6 +108,10 @@ value2string (const GValue * value, int depth)
{
gchar * str = NULL;
+ if (value == NULL) {
+ return g_strdup("(null)");
+ }
+
if (dbus_g_type_is_collection(G_VALUE_TYPE(value))) {
str = collection_dumper(value, depth);
} else if (G_VALUE_TYPE(value) == G_TYPE_STRV) {