Add the exception handling logic for TC
[platform/core/connectivity/bluetooth-agent.git] / ag-agent / bluetooth-ag-agent.c
index 099485c..609da2e 100644 (file)
@@ -1244,7 +1244,8 @@ gboolean _bt_hfp_agent_nrec_status(gboolean status,
        else
                hs->nrec_status = TRUE;
 
-       _bt_ag_agent_emit_signal(ag_dbus_conn, hs->path,
+       if (ag_dbus_conn)
+               _bt_ag_agent_emit_signal(ag_dbus_conn, hs->path,
                                        BT_AG_SERVICE_NAME, "NrecStatusChanged",
                                        g_variant_new("(b)", status));
        FN_END;