[gnome-notes/gnome-3-30] shell-search-provider: Don't free icon



commit 71393532941cba1f99f797b1c9862367f58093db
Author: Isaque Galdino <igaldino gmail com>
Date:   Sun Nov 11 20:29:24 2018 -0200

    shell-search-provider: Don't free icon
    
    Notes shell search provider was crashing when freeing notes objects.
    
    The reason was that in order to provide an icon for GNOME Shell,
    application was getting note's icon, which is a cairo_surface_t object,
    creating a GdkPixbuf from that, and finally freeing the cairo_surface_t
    object.
    
    The problem is that the cairo_surface_t object, AKA note's icon, was
    still being referenced by the note object, so when the note object was
    freed, it tried to freed cairo_surface_t object, which address was
    already invalid.

 src/bijiben-shell-search-provider.c | 2 --
 1 file changed, 2 deletions(-)
---
diff --git a/src/bijiben-shell-search-provider.c b/src/bijiben-shell-search-provider.c
index 2fe30cd..7acff92 100644
--- a/src/bijiben-shell-search-provider.c
+++ b/src/bijiben-shell-search-provider.c
@@ -218,8 +218,6 @@ get_note_icon (BijibenShellSearchProviderApp *self,
       gicon = G_ICON (gdk_pixbuf_get_from_surface (surface, 0, 0,
                                                    cairo_image_surface_get_width (surface),
                                                    cairo_image_surface_get_height (surface)));
-
-      cairo_surface_destroy (surface);
     }
 
   if (gicon == NULL)


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