Make the same null pointer fix in jsontool.cpp as in geojson.cpp

This commit is contained in:
Eric Fischer 2017-11-22 13:06:39 -08:00
parent 2234e37883
commit 8ac7c46788

View File

@ -380,7 +380,7 @@ void process(FILE *fp, const char *fname) {
int is_geometry = 1;
if (j->parent != NULL) {
if (j->parent->type == JSON_ARRAY) {
if (j->parent->type == JSON_ARRAY && j->parent->parent != NULL) {
if (j->parent->parent->type == JSON_HASH) {
json_object *geometries = json_hash_get(j->parent->parent, "geometries");
if (geometries != NULL) {