diff --git a/src/pulsecore/idxset.c b/src/pulsecore/idxset.c index 5c79767df..23fe0b5a7 100644 --- a/src/pulsecore/idxset.c +++ b/src/pulsecore/idxset.c @@ -286,6 +286,9 @@ void* pa_idxset_remove_by_index(pa_idxset*s, uint32_t idx) { if (!(a = array_index(s, idx))) return NULL; + if (!*a) + return NULL; + data = (*a)->data; remove_entry(s, *a);