Fix missing null pointer check

This commit is contained in:
Eric Fischer
2018-06-19 13:10:58 -07:00
parent 9dac499ab4
commit 262fbf26f0
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ void check_crs(json_object *j, const char *reading) {
json_object *properties = json_hash_get(crs, "properties");
if (properties != NULL) {
json_object *name = json_hash_get(properties, "name");
if (name->type == JSON_STRING) {
if (name != NULL && name->type == JSON_STRING) {
if (strcmp(name->string, projection->alias) != 0) {
if (!quiet) {
fprintf(stderr, "%s: Warning: GeoJSON specified projection \"%s\", not the expected \"%s\".\n", reading, name->string, projection->alias);