[gtk] picture: Unref previous paintable



commit 28846917406bcd75d4056b21b3e27e8de84fd924
Author: Timm Bäder <mail baedert org>
Date:   Sat Jul 13 09:38:28 2019 +0200

    picture: Unref previous paintable
    
    We were leaking all of them.

 gtk/gtkpicture.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkpicture.c b/gtk/gtkpicture.c
index 1ae70f7cde..125d37c60b 100644
--- a/gtk/gtkpicture.c
+++ b/gtk/gtkpicture.c
@@ -809,6 +809,8 @@ gtk_picture_set_paintable (GtkPicture   *self,
         g_signal_handlers_disconnect_by_func (self->paintable,
                                               gtk_picture_paintable_invalidate_size,
                                               self);
+
+      g_object_unref (self->paintable);
     }
 
   self->paintable = paintable;


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