1 |
ssuominen 13/03/31 04:49:14 |
2 |
|
3 |
Added: xfce4-appfinder-4.10.0-null-pointers.patch |
4 |
xfce4-appfinder-4.10.0-icon-theme-segfault.patch |
5 |
Log: |
6 |
Backport some crash fixes from upstream. |
7 |
|
8 |
(Portage version: 2.2.0_alpha169/cvs/Linux x86_64, signed Manifest commit with key 4868F14D) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 xfce-base/xfce4-appfinder/files/xfce4-appfinder-4.10.0-null-pointers.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/xfce-base/xfce4-appfinder/files/xfce4-appfinder-4.10.0-null-pointers.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/xfce-base/xfce4-appfinder/files/xfce4-appfinder-4.10.0-null-pointers.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: xfce4-appfinder-4.10.0-null-pointers.patch |
17 |
=================================================================== |
18 |
From 2a14564c8e1677c002ffac8643f706b334050988 Mon Sep 17 00:00:00 2001 |
19 |
From: Nick Schermer <nick@××××.org> |
20 |
Date: Sat, 08 Sep 2012 09:55:19 +0000 |
21 |
Subject: Protect against possible null pointers (bug #9109). |
22 |
|
23 |
(cherry picked from commit 424418316733e3f8b9b17cd7345fe6d967b06ef8) |
24 |
--- |
25 |
diff --git a/src/appfinder-category-model.c b/src/appfinder-category-model.c |
26 |
index 483c4cc..3f3a060 100644 |
27 |
--- a/src/appfinder-category-model.c |
28 |
+++ b/src/appfinder-category-model.c |
29 |
@@ -589,6 +589,7 @@ xfce_appfinder_category_model_icon_theme_changed (XfceAppfinderCategoryModel *mo |
30 |
for (li = model->categories, idx = 0; li != NULL; li = li->next, idx++) |
31 |
{ |
32 |
item = li->data; |
33 |
+ appfinder_assert (item != NULL); |
34 |
|
35 |
if (item->pixbuf != NULL) |
36 |
{ |
37 |
diff --git a/src/appfinder-window.c b/src/appfinder-window.c |
38 |
index 155e011..4f99c6a 100644 |
39 |
--- a/src/appfinder-window.c |
40 |
+++ b/src/appfinder-window.c |
41 |
@@ -1453,8 +1453,11 @@ xfce_appfinder_window_icon_theme_changed (XfceAppfinderWindow *window) |
42 |
window->icon_find = xfce_appfinder_model_load_pixbuf (GTK_STOCK_FIND, XFCE_APPFINDER_ICON_SIZE_48); |
43 |
|
44 |
/* drop cached pixbufs */ |
45 |
- xfce_appfinder_model_icon_theme_changed (window->model); |
46 |
- xfce_appfinder_category_model_icon_theme_changed (window->category_model); |
47 |
+ if (G_LIKELY (window->model != NULL)) |
48 |
+ xfce_appfinder_model_icon_theme_changed (window->model); |
49 |
+ |
50 |
+ if (G_LIKELY (window->category_model != NULL)) |
51 |
+ xfce_appfinder_category_model_icon_theme_changed (window->category_model); |
52 |
|
53 |
/* update state */ |
54 |
xfce_appfinder_window_entry_changed (window); |
55 |
-- |
56 |
cgit v0.9.0.3 |
57 |
|
58 |
|
59 |
|
60 |
1.1 xfce-base/xfce4-appfinder/files/xfce4-appfinder-4.10.0-icon-theme-segfault.patch |
61 |
|
62 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/xfce-base/xfce4-appfinder/files/xfce4-appfinder-4.10.0-icon-theme-segfault.patch?rev=1.1&view=markup |
63 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/xfce-base/xfce4-appfinder/files/xfce4-appfinder-4.10.0-icon-theme-segfault.patch?rev=1.1&content-type=text/plain |
64 |
|
65 |
Index: xfce4-appfinder-4.10.0-icon-theme-segfault.patch |
66 |
=================================================================== |
67 |
From eb46f5acd4b0b985a94bee6942d6527f9f620b84 Mon Sep 17 00:00:00 2001 |
68 |
From: Nick Schermer <nick@××××.org> |
69 |
Date: Sat, 16 Mar 2013 18:03:01 +0000 |
70 |
Subject: Detatch from icon theme to avoid segfault (bug #9730). |
71 |
|
72 |
--- |
73 |
diff --git a/src/appfinder-window.c b/src/appfinder-window.c |
74 |
index d3cd567..b5ca272 100644 |
75 |
--- a/src/appfinder-window.c |
76 |
+++ b/src/appfinder-window.c |
77 |
@@ -129,6 +129,8 @@ struct _XfceAppfinderWindow |
78 |
|
79 |
XfceAppfinderActions *actions; |
80 |
|
81 |
+ GtkIconTheme *icon_theme; |
82 |
+ |
83 |
GtkEntryCompletion *completion; |
84 |
|
85 |
XfconfChannel *channel; |
86 |
@@ -204,7 +206,6 @@ xfce_appfinder_window_init (XfceAppfinderWindow *window) |
87 |
GtkWidget *bbox; |
88 |
GtkWidget *button; |
89 |
GtkEntryCompletion *completion; |
90 |
- GtkIconTheme *icon_theme; |
91 |
gint integer; |
92 |
|
93 |
window->channel = xfconf_channel_get ("xfce4-appfinder"); |
94 |
@@ -400,9 +401,10 @@ xfce_appfinder_window_init (XfceAppfinderWindow *window) |
95 |
image = gtk_image_new_from_stock (GTK_STOCK_EXECUTE, GTK_ICON_SIZE_BUTTON); |
96 |
gtk_button_set_image (GTK_BUTTON (button), image); |
97 |
|
98 |
- icon_theme = gtk_icon_theme_get_for_screen (gtk_window_get_screen (GTK_WINDOW (window))); |
99 |
- g_signal_connect_swapped (G_OBJECT (icon_theme), "changed", |
100 |
+ window->icon_theme = gtk_icon_theme_get_for_screen (gtk_window_get_screen (GTK_WINDOW (window))); |
101 |
+ g_signal_connect_swapped (G_OBJECT (window->icon_theme), "changed", |
102 |
G_CALLBACK (xfce_appfinder_window_icon_theme_changed), window); |
103 |
+ g_object_ref (G_OBJECT (window->icon_theme)); |
104 |
|
105 |
/* load categories in the model */ |
106 |
xfce_appfinder_window_category_set_categories (NULL, window); |
107 |
@@ -432,6 +434,11 @@ xfce_appfinder_window_finalize (GObject *object) |
108 |
g_signal_handler_disconnect (window->channel, window->property_watch_id); |
109 |
g_signal_handler_disconnect (window->model, window->categories_changed_id); |
110 |
|
111 |
+ /* release our reference on the icon theme */ |
112 |
+ g_signal_handlers_disconnect_by_func (G_OBJECT (window->icon_theme), |
113 |
+ xfce_appfinder_window_icon_theme_changed, window); |
114 |
+ g_object_unref (G_OBJECT (window->icon_theme)); |
115 |
+ |
116 |
g_object_unref (G_OBJECT (window->model)); |
117 |
g_object_unref (G_OBJECT (window->category_model)); |
118 |
g_object_unref (G_OBJECT (window->completion)); |
119 |
@@ -1520,6 +1527,8 @@ xfce_appfinder_window_row_activated (XfceAppfinderWindow *window) |
120 |
static void |
121 |
xfce_appfinder_window_icon_theme_changed (XfceAppfinderWindow *window) |
122 |
{ |
123 |
+ appfinder_return_if_fail (XFCE_IS_APPFINDER_WINDOW (window)); |
124 |
+ |
125 |
if (window->icon_find != NULL) |
126 |
g_object_unref (G_OBJECT (window->icon_find)); |
127 |
window->icon_find = xfce_appfinder_model_load_pixbuf (GTK_STOCK_FIND, XFCE_APPFINDER_ICON_SIZE_48); |
128 |
-- |
129 |
cgit v0.9.1 |