diff --git a/daemon/call.c b/daemon/call.c index fb188563f..c1bd3f4d4 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -4005,7 +4005,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);