[eog] Fix mem leak when rotating animations



commit 53d23233729079bf5e9c00eb9b50d173ab81fb9e
Author: Raoul Berger <contact raoulito info>
Date:   Thu Oct 22 19:16:46 2009 +0200

    Fix mem leak when rotating animations

 src/eog-scroll-view.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/eog-scroll-view.c b/src/eog-scroll-view.c
index 50b87a7..60005dd 100644
--- a/src/eog-scroll-view.c
+++ b/src/eog-scroll-view.c
@@ -1906,6 +1906,12 @@ display_next_frame_cb (EogImage *image, gint delay, gpointer data)
 
 	view = EOG_SCROLL_VIEW (data);
 	priv = view->priv;
+
+	if (priv->pixbuf != NULL) {
+		g_object_unref (priv->pixbuf);
+		priv->pixbuf = NULL;
+	}
+
 	priv->pixbuf = eog_image_get_pixbuf (image);
 	gtk_widget_queue_draw (GTK_WIDGET (priv->display)); 
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]