From: Vsevolod Stakhov Date: Sun, 6 Jan 2013 16:48:32 +0000 (+0400) Subject: Json ',' fix... X-Git-Tag: 0.5.4~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79224aed0da78f42c90e2f5ccaf84163d08787b2;p=thirdparty%2Frspamd.git Json ',' fix... --- diff --git a/src/webui.c b/src/webui.c index 04b9014cf1..5e6d037c0b 100644 --- a/src/webui.c +++ b/src/webui.c @@ -414,9 +414,12 @@ http_handle_maps (struct evhttp_request *req, gpointer arg) if (cur->next) { next = cur->next->data; } + else { + next = NULL; + } evbuffer_add_printf (evb, "{\"map\":%u,\"description\":\"%s\",\"editable\":%s%s", map->id, map->description, editable ? "true" : "false", - (next->protocol == MAP_PROTO_FILE && next->description) ? "}," : "}"); + (next && next->protocol == MAP_PROTO_FILE && next->description) ? "}," : "}"); } } cur = g_list_next (cur);