# HG changeset patch # User reimar # Date 1351619042 0 # Node ID aa10c22f69f46b68bc750f6384bd925a77e3f755 # Parent 522fcb8ffb1b35c4eee699a4ca022f6804ff77fb Fix crash when only specifying a host for -ao pulse. diff -r 522fcb8ffb1b -r aa10c22f69f4 libao2/ao_pulse.c --- 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;