diff --git a/daemon/call.c b/daemon/call.c index d00bc565f..4a02941cb 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -3999,7 +3999,8 @@ void call_destroy(call_t *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);