diff options
-rw-r--r-- | src/webui.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/webui.c b/src/webui.c index 04b9014cf..5e6d037c0 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); |