summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Shann <rshann@debianrts.home>2011-02-15 09:50:19 +0000
committerRichard Shann <rshann@debianrts.home>2011-02-15 09:50:19 +0000
commit99080a0c288fa9f549cfe3334e1ebac12e8b2915 (patch)
treeb3458de190348f1c11121a28ce58d1a7c043f57b
parent5d57f3297cebfcab7236d60906bba8e3eaf9ca27 (diff)
Call cairo_destroy to deallocate the cairo_t created in each draw fixes: bug #32371
-rw-r--r--src/draw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/draw.c b/src/draw.c
index 74e59884..b84ded0c 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -967,7 +967,9 @@ draw_score (GtkWidget * widget, DenemoGUI * gui)
get_obj_for_start_time(gui->si->smf, gui->si->end_time - 0.001);
//g_print("Start time %p %f end time %p %f\n", itp.startobj, si->start_time, itp.endobj, si->end_time);
}
- cairo_t *cr = widget?gdk_cairo_create( Denemo.pixmap ): NULL;
+ static cairo_t *cr;
+ if(cr) cairo_destroy(cr);
+ cr = widget?gdk_cairo_create( Denemo.pixmap ): NULL;
if(cr) cairo_scale( cr, gui->si->zoom, gui->si->zoom );
if(cr) cairo_translate( cr, 0.5, 0.5 );