mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 09:55:41 +02:00
Be more cautious about use of a null feature for bare geometries
This commit is contained in:
+1
-1
@@ -113,7 +113,7 @@ void parse_json(json_feature_action *jfa, json_pull *jp) {
|
|||||||
}
|
}
|
||||||
found_geometries++;
|
found_geometries++;
|
||||||
|
|
||||||
jfa->add_feature(j, false, NULL, NULL, NULL, NULL);
|
jfa->add_feature(j, false, NULL, NULL, NULL, j);
|
||||||
json_free(j);
|
json_free(j);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -365,7 +365,7 @@ void join_csv(json_object *j) {
|
|||||||
|
|
||||||
struct json_join_action : json_feature_action {
|
struct json_join_action : json_feature_action {
|
||||||
int add_feature(json_object *geometry, bool, json_object *, json_object *, json_object *, json_object *feature) {
|
int add_feature(json_object *geometry, bool, json_object *, json_object *, json_object *, json_object *feature) {
|
||||||
if (feature != NULL) {
|
if (feature != geometry) { // a real feature, not a bare geometry
|
||||||
if (csvfile != NULL) {
|
if (csvfile != NULL) {
|
||||||
join_csv(feature);
|
join_csv(feature);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user