From b6d023bb640ec955e89bfecd816382169746b979 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 28 Feb 2015 09:50:58 +0000 Subject: Remove animate idle callback on destruction. This should have already been the case, but g_idle_remove_by_data doesn't seem to be doing what it should. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5609 a436a847-0d15-0410-975c-d299462d15a1 --- src/Canvas.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/Canvas.cpp b/src/Canvas.cpp index 1c8410b..4db5576 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -268,6 +268,7 @@ struct GanvCanvasImpl { ~GanvCanvasImpl() { + g_source_remove(_animate_idle_id); while (g_idle_remove_by_data(this)) ; ganv_canvas_clear(_gcanvas); gdk_cursor_unref(_move_cursor); @@ -2877,6 +2878,7 @@ ganv_canvas_unrealize(GtkWidget* widget) GanvCanvas* canvas = GANV_CANVAS(widget); + g_source_remove(canvas->impl->_animate_idle_id); while (g_idle_remove_by_data(canvas->impl)) {} shutdown_transients(canvas); -- cgit v1.2.1