Skip to content

Commit

Permalink
added vect_destroy_field_info
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Vasudeo Desai committed Oct 25, 2024
1 parent 59e912e commit 5e096fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/vector/Vlib/copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,11 +648,12 @@ int Vect_copy_tables(struct Map_info *In, struct Map_info *Out, int field)
if (Fi == NULL) {
G_warning(_("Database connection not defined for layer %d"),
In->dblnk->field[i].number);
Vect_destroy_field_info(Fi);
return -1;
}
if (field > 0 && Fi->number != field)
if (field > 0 && Fi->number != field) {
Vect_destroy_field_info(Fi);
continue;
}

if (Vect_copy_table(In, Out, Fi->number, Fi->number, Fi->name, type) !=
0) {
Expand Down

0 comments on commit 5e096fc

Please sign in to comment.