[pulseaudio-commits] r1599 - in /branches/lennart/src/modules: module-alsa-sink.c module-alsa-source.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Aug 9 10:52:14 PDT 2007


Author: lennart
Date: Thu Aug  9 19:52:13 2007
New Revision: 1599

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1599&root=3Dpulseaudio&vi=
ew=3Drev
Log:
don't hit an assert when we cannot resume a device

Modified:
    branches/lennart/src/modules/module-alsa-sink.c
    branches/lennart/src/modules/module-alsa-source.c

Modified: branches/lennart/src/modules/module-alsa-sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/modules/mo=
dule-alsa-sink.c?rev=3D1599&root=3Dpulseaudio&r1=3D1598&r2=3D1599&view=3Ddi=
ff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/modules/module-alsa-sink.c (original)
+++ branches/lennart/src/modules/module-alsa-sink.c Thu Aug  9 19:52:13 2007
@@ -337,8 +337,10 @@
     return 0;
 =

 fail:
-    snd_pcm_close(u->pcm_handle);
-    u->pcm_handle =3D NULL;
+    if (u->pcm_handle) {
+        snd_pcm_close(u->pcm_handle);
+        u->pcm_handle =3D NULL;
+    }
 =

     return -1;
 }

Modified: branches/lennart/src/modules/module-alsa-source.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/modules/mo=
dule-alsa-source.c?rev=3D1599&root=3Dpulseaudio&r1=3D1598&r2=3D1599&view=3D=
diff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/modules/module-alsa-source.c (original)
+++ branches/lennart/src/modules/module-alsa-source.c Thu Aug  9 19:52:13 2=
007
@@ -325,8 +325,10 @@
     return 0;
 =

 fail:
-    snd_pcm_close(u->pcm_handle);
-    u->pcm_handle =3D NULL;
+    if (u->pcm_handle) {
+        snd_pcm_close(u->pcm_handle);
+        u->pcm_handle =3D NULL;
+    }
 =

     return -1;
 }




More information about the pulseaudio-commits mailing list