From a6179250d5cfff0563c4b43e1052a4e747e3f761 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Thu, 11 Apr 2013 21:26:42 +0100 Subject: Remove scheduled redraws for destroyed windows --- amiga/gui.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'amiga') diff --git a/amiga/gui.c b/amiga/gui.c index 0e07be020..105d59f01 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -3781,6 +3781,7 @@ void gui_window_destroy(struct gui_window *g) } ami_plot_release_pens(&g->shared->shared_pens); + ami_schedule_redraw_remove(g->shared); DisposeObject(g->shared->objects[OID_MAIN]); ami_gui_appicon_remove(g->shared); @@ -3911,6 +3912,11 @@ void ami_schedule_redraw(struct gui_window_2 *gwin, bool full_redraw) gwin->redraw_scheduled = true; } +static void ami_schedule_redraw_remove(struct gui_window_2 *gwin) +{ + schedule_remove(ami_redraw_callback, gwin); +} + static void ami_do_redraw_tiled(struct gui_window_2 *gwin, bool busy, int left, int top, int width, int height, int sx, int sy, struct IBox *bbox, struct redraw_context *ctx) -- cgit v1.2.3