From a7acdcd071df69cbeecb9afa122c6b1b3aa1ae9f Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 2 Dec 2011 12:09:33 +0100 Subject: sim: only unexport object if currently exported Avoid trying to unexport the object if it was never exported before. --- src/mm-sim.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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)); } /*****************************************************************************/ -- cgit v1.2.3-70-g09d2