mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-07 12:06:32 -04:00
modules: handle get_registry NULL return value
This commit is contained in:
parent
ac95f1241e
commit
95a4772031
2 changed files with 8 additions and 0 deletions
|
|
@ -1723,6 +1723,10 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
goto error;
|
||||
|
||||
impl->registry = pw_core_get_registry(impl->core, PW_VERSION_REGISTRY, 0);
|
||||
if (impl->registry == NULL) {
|
||||
res = -errno;
|
||||
goto error;
|
||||
}
|
||||
pw_registry_add_listener(impl->registry, &impl->registry_listener,
|
||||
®istry_events, impl);
|
||||
|
||||
|
|
|
|||
|
|
@ -2189,6 +2189,10 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
goto out;
|
||||
|
||||
impl->registry = pw_core_get_registry(impl->core, PW_VERSION_REGISTRY, 0);
|
||||
if (impl->registry == NULL) {
|
||||
res = -errno;
|
||||
goto out;
|
||||
}
|
||||
pw_registry_add_listener(impl->registry, &impl->registry_listener,
|
||||
®istry_events, impl);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue