It fixes such error :
GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed
Also it makes no sense to reference priv->adapter pointer before setting it
to NULL. So unref priv->adapter it instead.
Change-Id: I0b27d0d16192e8e647ffc00fd9704a90700417b2
Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
priv->osp_servers = NULL;
}
- g_object_ref(priv->adapter);
- priv->adapter = NULL;
+ if (priv->adapter) {
+ g_object_unref(priv->adapter);
+ priv->adapter = NULL;
+ }
g_free(priv->path);
priv->path = NULL;