segmentation fault in export when a plane has no name (default plane).

This commit is contained in:
Enno Rehling 2014-10-09 08:34:03 +02:00
parent 077d7d8d49
commit fb32ebcd18
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ int json_export(stream * out, int flags) {
cJSON_AddNumberToObject(data, "y", p->miny);
cJSON_AddNumberToObject(data, "width", p->maxx-p->minx);
cJSON_AddNumberToObject(data, "height", p->maxy-p->miny);
cJSON_AddStringToObject(data, "name", p->name);
if (p->name) cJSON_AddStringToObject(data, "name", p->name);
}
cJSON_AddItemToObject(root, "regions", json = cJSON_CreateObject());