mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
don't hit an assert when we cannot resume a device
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1599 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
eaddc0195c
commit
ed01e1adb5
2 changed files with 8 additions and 4 deletions
|
|
@ -337,8 +337,10 @@ static int unsuspend(struct userdata *u) {
|
|||
return 0;
|
||||
|
||||
fail:
|
||||
snd_pcm_close(u->pcm_handle);
|
||||
u->pcm_handle = NULL;
|
||||
if (u->pcm_handle) {
|
||||
snd_pcm_close(u->pcm_handle);
|
||||
u->pcm_handle = NULL;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -325,8 +325,10 @@ static int unsuspend(struct userdata *u) {
|
|||
return 0;
|
||||
|
||||
fail:
|
||||
snd_pcm_close(u->pcm_handle);
|
||||
u->pcm_handle = NULL;
|
||||
if (u->pcm_handle) {
|
||||
snd_pcm_close(u->pcm_handle);
|
||||
u->pcm_handle = NULL;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue