aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-12-02 12:09:33 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:32 +0100
commita7acdcd071df69cbeecb9afa122c6b1b3aa1ae9f (patch)
tree43ff69980fd772e558961d2d2c7349c9be2c4f79
parent7030bbc5866fc800c6a99ff921c42f81c805f759 (diff)
sim: only unexport object if currently exported
Avoid trying to unexport the object if it was never exported before.
-rw-r--r--src/mm-sim.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mm-sim.c b/src/mm-sim.c
index 1a84c7a0..aa063c9b 100644
--- a/src/mm-sim.c
+++ b/src/mm-sim.c
@@ -345,7 +345,9 @@ mm_sim_export (MMSim *self)
static void
mm_sim_unexport (MMSim *self)
{
- g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (self));
+ /* Only unexport if currently exported */
+ if (g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (self)))
+ g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (self));
}
/*****************************************************************************/