From: Thomas Fitzsimmons Date: Mon, 1 Apr 2013 17:10:16 +0000 (-0400) Subject: Don't reference path[1] in warning message if path[0] is NULL X-Git-Tag: dbus-1.7.6~43^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b6f144f1cc40980eded278cec0892078da6657a;p=thirdparty%2Fdbus.git Don't reference path[1] in warning message if path[0] is NULL --- diff --git a/dbus/dbus-object-tree.c b/dbus/dbus-object-tree.c index eba22d143..642d67c30 100644 --- a/dbus/dbus-object-tree.c +++ b/dbus/dbus-object-tree.c @@ -647,7 +647,7 @@ _dbus_object_tree_unregister_and_unlock (DBusObjectTree *tree, { _dbus_warn ("Attempted to unregister path (path[0] = %s path[1] = %s) which isn't registered\n", path[0] ? path[0] : "null", - path[1] ? path[1] : "null"); + (path[0] && path[1]) ? path[1] : "null"); goto unlock; } #else