summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <arun@arunraghavan.net>2016-06-21 17:19:39 +0530
committerArun Raghavan <arun@arunraghavan.net>2016-06-21 17:38:21 +0530
commiteffb3f1d234dc7cffb1be15051ff7194caa39f1a (patch)
tree54119b224c2c1896167cb97252816239682fb26e
parenta07b6a8cda7fd088b60ab59186b486a7b0987282 (diff)
downloadpulseaudio-effb3f1d234dc7cffb1be15051ff7194caa39f1a.tar.gz
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 <arun@arunraghavan.net>
-rw-r--r--src/pulsecore/sink-input.c2
-rw-r--r--src/pulsecore/source-output.c2
2 files changed, 2 insertions, 2 deletions
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