Mercurial > mplayer.hg
diff libao2/ao_pulse.c @ 35202:aa10c22f69f4
Fix crash when only specifying a host for -ao pulse.
author | reimar |
---|---|
date | Tue, 30 Oct 2012 17:44:02 +0000 |
parents | f2c90c9dd61c |
children | 99708d402208 |
line wrap: on
line diff
--- a/libao2/ao_pulse.c Tue Oct 30 17:36:41 2012 +0000 +++ b/libao2/ao_pulse.c Tue Oct 30 17:44:02 2012 +0000 @@ -156,7 +156,7 @@ sink = strchr(devarg, ':'); if (sink) *sink++ = 0; if (devarg[0]) host = devarg; - opts = strchr(sink, ':'); + opts = sink ? strchr(sink, ':') : NULL; if (opts) { *opts++ = 0; if (!sink[0]) sink = NULL;