summaryrefslogtreecommitdiff
path: root/src/pulsecore/source-output.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-04-01 03:03:20 +0200
committerLennart Poettering <lennart@poettering.net>2009-04-01 03:03:20 +0200
commitc2f6d090c795bba9ef405908cee06bba79a87f1f (patch)
tree40bea0d66227b831ffe3018755886be37d4d972d /src/pulsecore/source-output.c
parentd9b19f870c4803aea7d6fc7f7bfc93f78b097435 (diff)
don't access i->sink if it is not set
Diffstat (limited to 'src/pulsecore/source-output.c')
-rw-r--r--src/pulsecore/source-output.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 550b6571..5c240063 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -542,10 +542,12 @@ pa_usec_t pa_source_output_set_requested_latency(pa_source_output *o, pa_usec_t
/* If this source output is not realized yet or is being moved, we
* have to touch the thread info data directly */
- pa_source_get_latency_range(o->source, &min_latency, &max_latency);
+ if (o->source) {
+ pa_source_get_latency_range(o->source, &min_latency, &max_latency);
- if (usec != (pa_usec_t) -1)
- usec = PA_CLAMP(usec, min_latency, max_latency);
+ if (usec != (pa_usec_t) -1)
+ usec = PA_CLAMP(usec, min_latency, max_latency);
+ }
o->thread_info.requested_source_latency = usec;