make sure priv->adapter exists before unref it when freeing gap agent 00/28700/1 accepted/tizen/common/20141015.065241 submit/tizen/20141015.022242
authorCorentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
Tue, 14 Oct 2014 08:45:18 +0000 (10:45 +0200)
committerCorentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
Tue, 14 Oct 2014 09:02:59 +0000 (11:02 +0200)
commit2c787fee018ee4f30fcbffbcf7f49c4e89e590e4
tree1ee609540553228f7faeca647b4c1e3502f002fe
parent46242a36a996f3b9092a482031559a1d153aa5b4
make sure priv->adapter exists before unref it when freeing gap agent

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>
bt-service/bt-service-gap-agent.c