Don't reference path[1] in warning message if path[0] is NULL

This commit is contained in:
Thomas Fitzsimmons 2013-04-01 13:10:16 -04:00
parent 89d4644ee5
commit 0b6f144f1c

View file

@ -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