summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pulsecore/idxset.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pulsecore/idxset.c b/src/pulsecore/idxset.c
index 5c79767d..23fe0b5a 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);