aboutsummaryrefslogtreecommitdiff
path: root/src/slideshow.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-02-24 11:44:30 +0100
committerThomas White <taw@bitwiz.org.uk>2015-02-24 11:44:30 +0100
commit11cf54695fbe47d96325392a4b1323bc16da7032 (patch)
treef507c1dbc96f0b84599cd567fbb8a7dd1d98715f /src/slideshow.c
parent24e5163fd377e860a62595d01b187be8df1d7a7d (diff)
Fix a load of memory leaks
Diffstat (limited to 'src/slideshow.c')
-rw-r--r--src/slideshow.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/slideshow.c b/src/slideshow.c
index 1018a71..b156a06 100644
--- a/src/slideshow.c
+++ b/src/slideshow.c
@@ -1,7 +1,7 @@
/*
* slideshow.c
*
- * Copyright © 2013-2014 Thomas White <taw@bitwiz.org.uk>
+ * Copyright © 2013-2015 Thomas White <taw@bitwiz.org.uk>
*
* This file is part of Colloquium.
*
@@ -74,6 +74,10 @@ void slideshow_rerender(SlideShow *ss)
int n;
SCBlock *stylesheets[2];
+ if ( ss->surface != NULL ) {
+ cairo_surface_destroy(ss->surface);
+ }
+
stylesheets[0] = ss->p->stylesheet;
stylesheets[1] = NULL;
@@ -90,6 +94,9 @@ static gint ss_destroy_sig(GtkWidget *widget, SlideShow *ss)
g_object_unref(ss->blank_cursor);
slidewindow_slideshow_ended(ss->slide_window);
slidewindow_redraw(ss->slide_window);
+ if ( ss->surface != NULL ) {
+ cairo_surface_destroy(ss->surface);
+ }
free(ss);
return FALSE;
}