mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
context: make sure required fields are not NULL
This commit is contained in:
parent
35bec2c7c4
commit
a92d060de9
1 changed files with 6 additions and 0 deletions
|
|
@ -406,6 +406,8 @@ static void device_event_info(void *object, const struct pw_device_info *info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (i->driver == NULL)
|
||||||
|
i->driver = "PipeWire";
|
||||||
global_sync(g);
|
global_sync(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -973,6 +975,10 @@ static void client_event_info(void *object, const struct pw_client_info *info)
|
||||||
i->driver = info->props ?
|
i->driver = info->props ?
|
||||||
spa_dict_lookup(info->props, PW_KEY_PROTOCOL) : NULL;
|
spa_dict_lookup(info->props, PW_KEY_PROTOCOL) : NULL;
|
||||||
}
|
}
|
||||||
|
if (i->name == NULL)
|
||||||
|
i->name = "Unknown";
|
||||||
|
if (i->driver == NULL)
|
||||||
|
i->name = "PipeWire";
|
||||||
global_sync(g);
|
global_sync(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue