From 9ec695559fed11acf6123db3cf350ad7206be34c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 30 Oct 2008 17:46:56 +0100 Subject: pulse: fix segfault without sink name Commit d692e9 broke configurations without explicit server or sink configuration. Check for getBlockParam()==NULL. --- src/output/pulse_plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3