media-session: clean proxy and handle in destroy

After we called destroy on the handle and proxy we should not
try to access them anymore so we set them to NULL.

See #534
This commit is contained in:
Wim Taymans 2021-01-05 10:04:15 +01:00
parent 307d62484c
commit 962bf4d897

View file

@ -321,6 +321,10 @@ int sm_object_destroy(struct sm_object *obj)
pw_proxy_unref(p); pw_proxy_unref(p);
if (h) if (h)
pw_proxy_unref(h); pw_proxy_unref(h);
obj->proxy = NULL;
obj->handle = NULL;
return 0; return 0;
} }