summaryrefslogtreecommitdiff
path: root/libmate-panel-applet/mate-panel-applet.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-07-14 02:36:39 -0400
committerlukefromdc <[email protected]>2017-07-16 20:52:10 -0400
commitcf46fb7f03d6ab0e106fa1cbfbf180fbbb9a5b75 (patch)
tree92c005719fe20f64ac73e18498b784a91f41ff93 /libmate-panel-applet/mate-panel-applet.c
parentdf36dcac197e8287ef5626d71556173b942c3f58 (diff)
downloadmate-panel-cf46fb7f03d6ab0e106fa1cbfbf180fbbb9a5b75.tar.bz2
mate-panel-cf46fb7f03d6ab0e106fa1cbfbf180fbbb9a5b75.tar.xz
libmate-panel-applet: Fix another potential source of applet crashes
Properly initialize pattern, GNOME found this stopped applet crashes on bg change(though not the same crashes we just fixed) based on https://github.com/GNOME/gnome-panel/commit/88b9beeb8ab69072fe6912af33c620143d17b0a3 We could return a random value from panel_applet_get_pattern_from_pixmap(), and that was very nasty.
Diffstat (limited to 'libmate-panel-applet/mate-panel-applet.c')
-rw-r--r--libmate-panel-applet/mate-panel-applet.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c
index 3bbaab82..26646091 100644
--- a/libmate-panel-applet/mate-panel-applet.c
+++ b/libmate-panel-applet/mate-panel-applet.c
@@ -1329,6 +1329,8 @@ mate_panel_applet_get_pattern_from_pixmap (MatePanelApplet *applet,
cairo_t *cr;
cairo_pattern_t *pattern;
+ pattern = NULL; /*Properly initialize this, otherwise crashes can occur*/
+
g_return_val_if_fail (PANEL_IS_APPLET (applet), NULL);
if (!gtk_widget_get_realized (GTK_WIDGET (applet)))