mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
alsa-monitor: don't use NULL device reserve
This commit is contained in:
parent
871bb47eb7
commit
bf483242eb
1 changed files with 2 additions and 2 deletions
|
|
@ -154,7 +154,7 @@ static int node_acquire(void *data)
|
|||
|
||||
node->acquired = true;
|
||||
|
||||
if (device && device->n_acquired++ == 0)
|
||||
if (device && device->n_acquired++ == 0 && device->reserve)
|
||||
rd_device_acquire(device->reserve);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -171,7 +171,7 @@ static int node_release(void *data)
|
|||
|
||||
node->acquired = false;
|
||||
|
||||
if (device && --device->n_acquired == 0)
|
||||
if (device && --device->n_acquired == 0 && device->reserve)
|
||||
rd_device_release(device->reserve);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue