diff --git a/daemon/call.c b/daemon/call.c index c13d3768c..1f50687d5 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -3501,7 +3501,8 @@ void call_destroy(struct call *c) { statistics_update_ip46_inc_dec(c, CMC_DECREMENT); statistics_update_foreignown_dec(c); - redis_delete(c, rtpe_redis_write); + if (c->redis_hosted_db >= 0) + redis_delete(c, rtpe_redis_write); __call_iterator_remove(c);