sim: only unexport object if currently exported

Avoid trying to unexport the object if it was never exported before.
This commit is contained in:
Aleksander Morgado
2012-03-15 14:14:32 +01:00
parent 7030bbc586
commit a7acdcd071
+3 -1
View File
@@ -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));
}
/*****************************************************************************/