Skip to content

Commit

Permalink
hush a -Wdangling-pointer= warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dk committed Aug 21, 2024
1 parent 4198302 commit ad0cdf1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion img/line.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ img_polyline( Handle dest, int n_points, Point * points, PImgPaintContext ctx)
PIcon i = (PIcon) dest;
int j;
ImgSegmentedLineRec rec;
RegionRec dummy_region;
RegionRec dummy_region, *save_region;
Box dummy_region_box, *pbox;
Point* pp;
Rect enclosure;
Expand Down Expand Up @@ -314,6 +314,7 @@ img_polyline( Handle dest, int n_points, Point * points, PImgPaintContext ctx)
rec.current_segment = 0;
rec.segment_offset = 0;
rec.segment_is_fg = 1;
save_region = ctx->region;
if ( ctx->region == NULL ) {
dummy_region.n_boxes = 1;
dummy_region.boxes = &dummy_region_box;
Expand Down Expand Up @@ -461,6 +462,7 @@ img_polyline( Handle dest, int n_points, Point * points, PImgPaintContext ctx)
if ( acc_y > INT_MIN)
segmented_hline( &rec, acc_x, x, acc_y, visibility);
}
ctx->region = save_region;
return true;
}

Expand Down

0 comments on commit ad0cdf1

Please sign in to comment.