diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index 4910536..dd5642d 100644
--- a/obexd/client/pbap.c
+++ b/obexd/client/pbap.c
const char *item, GError **err)
{
char *path;
+ guint id;
path = build_phonebook_path(location, item);
if (path == NULL) {
return TRUE;
}
- obc_session_setpath(pbap->session, path, pbap_setpath_cb, pbap, err);
- if (err != NULL) {
+ id = obc_session_setpath(pbap->session, path, pbap_setpath_cb, pbap,
+ err);
+ if (id > 0) {
g_free(pbap->path);
pbap->path = path;
return TRUE;