summaryrefslogtreecommitdiff
path: root/gui/sheet.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-20 20:42:34 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-20 20:42:34 -0300
commitca924a3926e2f726fc41b442a1b7b8235262d8a3 (patch)
treed7101298916944336d1e96546b1ee7514f68c80e /gui/sheet.c
parentb857d7dc32a12d8a1703110177d44289b8773fa7 (diff)
downloadeeshow-ca924a3926e2f726fc41b442a1b7b8235262d8a3.tar.gz
eeshow-ca924a3926e2f726fc41b442a1b7b8235262d8a3.tar.bz2
eeshow-ca924a3926e2f726fc41b442a1b7b8235262d8a3.zip
eeshow/gui/ (aoi_click): also protect from access after free
Unlike aoi_hover, aoi_click was not observed to actually run into this problem. But better safe than sorry.
Diffstat (limited to 'gui/sheet.c')
-rw-r--r--gui/sheet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/sheet.c b/gui/sheet.c
index d1ec01c..3be3868 100644
--- a/gui/sheet.c
+++ b/gui/sheet.c
@@ -394,9 +394,9 @@ static bool sheet_click(void *user, int x, int y)
curr_sheet = find_corresponding_sheet(ctx->old_hist->sheets,
ctx->new_hist->sheets, ctx->curr_sheet);
- if (aoi_click(ctx->aois, x, y))
+ if (aoi_click(&ctx->aois, x, y))
return 1;
- if (aoi_click(curr_sheet->aois,
+ if (aoi_click(&curr_sheet->aois,
ex + curr_sheet->xmin, ey + curr_sheet->ymin))
return 1;