GApplication: fix name unregister logic
authorRyan Lortie <desrt@desrt.ca>
Sat, 3 Mar 2012 16:40:51 +0000 (11:40 -0500)
committerRyan Lortie <desrt@desrt.ca>
Sat, 3 Mar 2012 16:48:12 +0000 (11:48 -0500)
commita5caa564b7ac03d49386690c3037e57bdf80563d
tree9082b1112eca6b00f29c26078d90f09688fc7bec
parent5c3e86277627a8cc2dab64dd25fc7a30369472e0
GApplication: fix name unregister logic

We were attempting to unregister our ownership of our D-Bus name even in
the case that we were non-unique (ie: we didn't actually own the name).
Rework the logic a bit to prevent that: for non-unique, we leave
impl->bus_name as NULL and we only register/unregister if it is
non-NULL.
gio/gapplicationimpl-dbus.c