From: Chan-yeol Park <chanyeol.park@xxxxxxxxxxx> --- audio/avrcp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/audio/avrcp.c b/audio/avrcp.c index df39d04..2e946c1 100644 --- a/audio/avrcp.c +++ b/audio/avrcp.c @@ -1272,8 +1272,11 @@ void avrcp_unregister(const bdaddr_t *src) servers = g_slist_remove(servers, server); - remove_record_from_server(server->ct_record_id); - remove_record_from_server(server->tg_record_id); + if (server->ct_record_id) + remove_record_from_server(server->ct_record_id); + + if (server->tg_record_id) + remove_record_from_server(server->tg_record_id); avctp_unregister(&server->src); g_free(server); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html