From d5fea12937d81f18ccd02ccec14a39653e8fe79f Mon Sep 17 00:00:00 2001 From: Claudiu Boriga Date: Thu, 19 Oct 2017 12:44:46 +0200 Subject: [PATCH] check call.recording structure before using it if call recording is not configured but the redis db contains calls with recording flag, then call.recording can be NULL --- daemon/redis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/redis.c b/daemon/redis.c index f09e6b069..2b17ba224 100644 --- a/daemon/redis.c +++ b/daemon/redis.c @@ -1527,7 +1527,7 @@ static void json_restore_call(struct redis *r, struct callmaster *m, const str * if (!redis_hash_get_str(&s, &call, "recording_meta_prefix")) { recording_start(c, s.s); - if (!redis_hash_get_str(&s, &call, "recording_metadata")) + if ((c->recording) && (!redis_hash_get_str(&s, &call, "recording_metadata"))) call_str_cpy(c, &c->recording->metadata, &s); }