From effb3f1d234dc7cffb1be15051ff7194caa39f1a Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 21 Jun 2016 17:19:39 +0530 Subject: sink-input,source-output: Fix crasher while setting property We were missing a case where a property is first set, and then cleared by setting a NULL value. Signed-off-by: Arun Raghavan --- src/pulsecore/sink-input.c | 2 +- src/pulsecore/source-output.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index 361b44593..c7d99efbf 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -1435,7 +1435,7 @@ void pa_sink_input_set_property(pa_sink_input *i, const char *key, const char *v if (pa_proplist_contains(i->proplist, key)) { old_value = pa_xstrdup(pa_proplist_gets(i->proplist, key)); - if (old_value) { + if (value && old_value) { if (pa_streq(value, old_value)) goto finish; } else diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c index d74a60ea7..6af1543ac 100644 --- a/src/pulsecore/source-output.c +++ b/src/pulsecore/source-output.c @@ -1087,7 +1087,7 @@ void pa_source_output_set_property(pa_source_output *o, const char *key, const c if (pa_proplist_contains(o->proplist, key)) { old_value = pa_xstrdup(pa_proplist_gets(o->proplist, key)); - if (old_value) { + if (value && old_value) { if (pa_streq(value, old_value)) goto finish; } else -- cgit v1.2.3