Skip to content

Commit

Permalink
Be more cautious about use of a null feature for bare geometries
Browse files Browse the repository at this point in the history
  • Loading branch information
e-n-f committed Aug 8, 2018
1 parent 98cf4d9 commit 19c132e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion geojson-loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void parse_json(json_feature_action *jfa, json_pull *jp) {
}
found_geometries++;

jfa->add_feature(j, false, NULL, NULL, NULL, NULL);
jfa->add_feature(j, false, NULL, NULL, NULL, j);
json_free(j);
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion jsontool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ void join_csv(json_object *j) {

struct json_join_action : json_feature_action {
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) {
join_csv(feature);
}
Expand Down

0 comments on commit 19c132e

Please sign in to comment.