[gnome-notes/wip/igaldino/shell-provider-crash] shell-search-provider: Don't free icon
- From: Isaque Galdino de Araujo <igaldino src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-notes/wip/igaldino/shell-provider-crash] shell-search-provider: Don't free icon
- Date: Sun, 11 Nov 2018 22:40:25 +0000 (UTC)
commit 6e1ecac5bd505d2c7bb3ec332b9ee03202d3772b
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 515ed40..8e1c737 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]