diff --git a/src/switch_channel.c b/src/switch_channel.c index d26fd919d2..8a9c597fb3 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -4869,7 +4869,7 @@ static void process_device_hup(switch_channel_t *channel) if (!node->hold_record) { node->hold_record = newhr; - } else { + } else if (last) { last->next = newhr; }