mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
impl-core: handle NULL resources
This commit is contained in:
parent
c21c42e943
commit
a5b3538053
1 changed files with 2 additions and 1 deletions
|
|
@ -141,9 +141,10 @@ static const struct pw_resource_events resource_events = {
|
||||||
static int destroy_resource(void *object, void *data)
|
static int destroy_resource(void *object, void *data)
|
||||||
{
|
{
|
||||||
struct pw_resource *resource = object;
|
struct pw_resource *resource = object;
|
||||||
struct pw_impl_client *client = resource->client;
|
struct pw_impl_client *client;
|
||||||
|
|
||||||
if (resource &&
|
if (resource &&
|
||||||
|
(client = resource->client) != NULL &&
|
||||||
resource != client->core_resource) {
|
resource != client->core_resource) {
|
||||||
pw_resource_remove(resource);
|
pw_resource_remove(resource);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue