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:
Lennart Poettering 2007-08-09 17:52:13 +00:00
parent eaddc0195c
commit ed01e1adb5
2 changed files with 8 additions and 4 deletions

View file

@ -337,8 +337,10 @@ static int unsuspend(struct userdata *u) {
return 0; return 0;
fail: fail:
if (u->pcm_handle) {
snd_pcm_close(u->pcm_handle); snd_pcm_close(u->pcm_handle);
u->pcm_handle = NULL; u->pcm_handle = NULL;
}
return -1; return -1;
} }

View file

@ -325,8 +325,10 @@ static int unsuspend(struct userdata *u) {
return 0; return 0;
fail: fail:
if (u->pcm_handle) {
snd_pcm_close(u->pcm_handle); snd_pcm_close(u->pcm_handle);
u->pcm_handle = NULL; u->pcm_handle = NULL;
}
return -1; return -1;
} }