Skip to content

Commit

Permalink
Suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Vasudeo Desai committed Jan 15, 2025
1 parent 7f39bd5 commit 96dddc6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions vector/v.to.rast/do_areas.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,13 @@ int sort_areas(struct Map_info *Map, struct line_pnts *Points, int field,
CELL cat;

G_begin_polygon_area_calculations();
Cats = Vect_new_cats_struct();

/* first count valid areas */
nareas = Vect_get_num_areas(Map);
if (nareas == 0) {
Vect_destroy_cats_struct(Cats);
if (nareas == 0)
return 0;
}

Cats = Vect_new_cats_struct();

/* allocate list to hold valid area info */
list = (struct list *)G_calloc(nareas * sizeof(char), sizeof(struct list));
Expand Down

0 comments on commit 96dddc6

Please sign in to comment.