aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-30 17:46:56 +0100
committerMax Kellermann <max@duempel.org>2008-10-30 17:46:56 +0100
commit9ec695559fed11acf6123db3cf350ad7206be34c (patch)
tree7772455368d61d15112707de793902b58ddb1afa /src
parentbc5429580e6dc0335aaaffc0837788d2c4efb9b6 (diff)
downloadmpd-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.c4
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;
}