diff options
author | Max Kellermann <max@duempel.org> | 2008-10-30 17:46:56 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-30 17:46:56 +0100 |
commit | 9ec695559fed11acf6123db3cf350ad7206be34c (patch) | |
tree | 7772455368d61d15112707de793902b58ddb1afa /src/output/pulse_plugin.c | |
parent | bc5429580e6dc0335aaaffc0837788d2c4efb9b6 (diff) | |
download | mpd-9ec695559fed11acf6123db3cf350ad7206be34c.tar.gz mpd-9ec695559fed11acf6123db3cf350ad7206be34c.tar.xz mpd-9ec695559fed11acf6123db3cf350ad7206be34c.zip |
pulse: fix segfault without sink name
Commit d692e9 broke configurations without explicit server or sink
configuration. Check for getBlockParam()==NULL.
Diffstat (limited to '')
-rw-r--r-- | src/output/pulse_plugin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/output/pulse_plugin.c b/src/output/pulse_plugin.c index c6849dbc6..3d9292ac7 100644 --- a/src/output/pulse_plugin.c +++ b/src/output/pulse_plugin.c @@ -73,8 +73,8 @@ pulse_init(struct audio_output *ao, pd = pulse_new_data(); pd->ao = ao; - pd->server = g_strdup(server->value); - pd->sink = g_strdup(sink->value); + pd->server = server != NULL ? g_strdup(server->value) : NULL; + pd->sink = sink != NULL ? g_strdup(sink->value) : NULL; return pd; } |