From 1cf238549b8a2626f537f00b215e75eb19621570 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 14 Dec 2009 20:02:14 +0300 Subject: * Fix issue with list concat --- src/spf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/spf.c b/src/spf.c index 7cb5ffe93..662ae285b 100644 --- a/src/spf.c +++ b/src/spf.c @@ -285,8 +285,12 @@ spf_record_dns_callback (int result, char type, int count, int ttl, void *addres /* Insert new list in place of include element */ last = g_list_last (cb->rec->addrs); - elt->prev->next = cb->rec->addrs; - elt->next->prev = last; + if (elt->prev) { + elt->prev->next = cb->rec->addrs; + } + if (elt->next) { + elt->next->prev = last; + } cb->rec->addrs->prev = elt->prev; last->next = elt->next; -- cgit v1.2.3