mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
libcamera: handle failure gracefully
Don't try to access NULL pointers
This commit is contained in:
parent
f8817b4394
commit
d71a10b7fa
3 changed files with 9 additions and 8 deletions
|
|
@ -210,10 +210,10 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
SPA_DEVICE_CHANGE_MASK_PROPS;
|
||||
this->info.flags = 0;
|
||||
|
||||
if(this->dev.camera == NULL) {
|
||||
if(this->dev.camera == NULL)
|
||||
this->dev.camera = (LibCamera*)newLibCamera();
|
||||
if(this->dev.camera != NULL)
|
||||
libcamera_set_log(this->dev.camera, this->dev.log);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue