From 20da7d70eab8a6bf375b11b33c790df1147abf7d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 2 Jun 2011 13:49:51 +0100 Subject: [PATCH 2/3] Fix regression in marshalling objects as object paths This regressed while fixing fd.o #36811. NetworkManager apparently uses this idiom. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37852 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628890 --- dbus/dbus-gobject.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c index 3b0bd17..7ee0b4f 100644 --- a/dbus/dbus-gobject.c +++ b/dbus/dbus-gobject.c @@ -3049,16 +3049,16 @@ out: const char * _dbus_gobject_get_path (GObject *obj) { - GSList *registrations; + ObjectExport *oe; ObjectRegistration *o; - registrations = g_object_get_data (obj, "dbus_glib_object_registrations"); + oe = g_object_get_data (obj, "dbus_glib_object_registrations"); - if (registrations == NULL) + if (oe == NULL || oe->registrations == NULL) return NULL; /* First one to have been registered wins */ - o = registrations->data; + o = oe->registrations->data; return o->object_path; } -- 1.7.5.3