From: Simon Tatham Date: Mon, 6 Sep 2004 15:17:59 +0000 (+0000) Subject: Move the deactivate_timer() call from window_destroy() into X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=f99b527b54fa350e9f281ab5850f45088ff41081;p=sgt-puzzles.git Move the deactivate_timer() call from window_destroy() into destroy(). I'm not sure how it cured the crash-on-quit bug, since it was in completely the wrong place! [originally from svn r4533] --- diff --git a/gtk.c b/gtk.c index 9643d19..72fdcdd 100644 --- a/gtk.c +++ b/gtk.c @@ -231,6 +231,8 @@ void end_draw(frontend *fe) static void destroy(GtkWidget *widget, gpointer data) { + frontend *fe = (frontend *)data; + deactivate_timer(fe); gtk_main_quit(); } @@ -415,8 +417,6 @@ void activate_timer(frontend *fe) static void window_destroy(GtkWidget *widget, gpointer data) { - frontend *fe = (frontend *)data; - deactivate_timer(fe); gtk_main_quit(); }