diff options
Diffstat (limited to 'mate-panel/panel-background.c')
-rw-r--r-- | mate-panel/panel-background.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mate-panel/panel-background.c b/mate-panel/panel-background.c index 9b503209..3ce08a5b 100644 --- a/mate-panel/panel-background.c +++ b/mate-panel/panel-background.c @@ -110,16 +110,14 @@ panel_background_prepare (PanelBackground *background) * backing region is cleared * (gdk_window_clear_backing_region), the correctly * scaled pattern is used */ - cairo_matrix_t m; cairo_surface_t *surface; - double width, height; - surface = NULL; - width = 1.0; - height = 1.0; cairo_pattern_get_surface(background->default_pattern, &surface); /* catch invalid images (e.g. -gtk-gradient) before scaling and rendering */ if (surface != NULL ){ + double width, height; + cairo_matrix_t m; + cairo_surface_reference(surface); width = cairo_image_surface_get_width (surface); height = cairo_image_surface_get_height (surface); |