mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-01-22 04:18:01 +00:00
Fix missing null pointer check
This commit is contained in:
parent
9dac499ab4
commit
262fbf26f0
@ -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);
|
||||
|
@ -1,4 +1,6 @@
|
||||
{"type":"FeatureCollection","features":[
|
||||
{"type":"FeatureCollection",
|
||||
"crs": { "type": "name", "properties": { } },
|
||||
"features":[
|
||||
{"type":"Feature","properties":{
|
||||
"boolean": true,
|
||||
"otherboolean": false,
|
||||
|
Loading…
Reference in New Issue
Block a user