commit 8ea1b32c8ee63a66d2b6c4328e060ff004a5c1a3 parent 89bb20af1990f76cf59eaba938293edc9cb273e9 Author: lumidify <nobody@lumidify.org> Date: Thu, 23 Apr 2020 11:27:48 +0200 Fix deletion of selections Diffstat:
M | croptool.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/croptool.c b/croptool.c @@ -482,8 +482,8 @@ static void clear_selection(GtkWidget *area, struct State *state) { if (state->cur_selection < 0 || !state->selections[state->cur_selection]) return; - free(state->selections[state->cur_selection]); - state->selections[state->cur_selection] = NULL; + struct Selection *sel = state->selections[state->cur_selection]; + sel->rect.x0 = sel->rect.x1 = sel->rect.y0 = sel->rect.y1 = -200; gtk_widget_queue_draw(area); }