summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2010-12-02 16:30:59 +0530
committerColin Guthrie <cguthrie@mandriva.org>2010-12-02 14:45:17 +0000
commitbd769fa98a51cbdc1fe4db7e19a0af5f19e44ac1 (patch)
tree8c32afa74eabe63da185d35f2091c5e6897dcbff /src/modules
parentf6574c8c225859ba2b2ddefd7593d4aac97b0c05 (diff)
rescue-streams: Fix segfault in some conditions
There is a call to this function where 'skip' variable is NULL. Looks like this code doesn't get hit very often, probably because a suitable default sink can be found to move the stream to. However, if we can't move to the default sink and skip is NULL, there will be a segfault.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/module-rescue-streams.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/module-rescue-streams.c b/src/modules/module-rescue-streams.c
index 722d84b2..2fcd21f0 100644
--- a/src/modules/module-rescue-streams.c
+++ b/src/modules/module-rescue-streams.c
@@ -159,7 +159,7 @@ static pa_source* find_evacuation_source(pa_core *c, pa_source_output *o, pa_sou
if (target == skip)
continue;
- if (!target->monitor_of != !skip->monitor_of)
+ if (skip && !target->monitor_of != !skip->monitor_of)
continue;
if (!PA_SOURCE_IS_LINKED(pa_source_get_state(target)))