aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/slideshow.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/slideshow.c b/src/slideshow.c
index 0b9cdcb..09f8919 100644
--- a/src/slideshow.c
+++ b/src/slideshow.c
@@ -81,7 +81,9 @@ static void slideshow_rerender(SCSlideshow *ss)
static gint ss_destroy_sig(GtkWidget *widget, SCSlideshow *ss)
{
- g_object_unref(ss->blank_cursor);
+ if ( ss->blank_cursor != NULL ) {
+ g_object_unref(ss->blank_cursor);
+ }
if ( ss->surface != NULL ) {
cairo_surface_destroy(ss->surface);
}
@@ -177,6 +179,8 @@ SCSlideshow *sc_slideshow_new(struct presentation *p)
ss->blank = 0;
ss->p = p;
ss->cur_slide = NULL;
+ ss->blank_cursor = NULL;
+ ss->surface = NULL;
if ( ss->inhibit == NULL ) {
ss->inhibit = inhibit_prepare();