From a3869cb7d3f16fe765249a54ddd61691de700768 Mon Sep 17 00:00:00 2001 From: infirit Date: Sun, 23 Nov 2014 14:02:22 +0100 Subject: Gtk3: panel: Explicitly check return value of cairo_surface_status() Do not assume that CAIRO_STATUS_SUCCESS == 0. This clarifies the code Taken from gnome-panel commit: d376b00a0a5856b3d5eb20a7dc1b39440d2f3938 --- mate-panel/panel-background.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mate-panel/panel-background.c') diff --git a/mate-panel/panel-background.c b/mate-panel/panel-background.c index 8765c2ea..d7b61f64 100644 --- a/mate-panel/panel-background.c +++ b/mate-panel/panel-background.c @@ -341,7 +341,7 @@ composite_image_onto_desktop (PanelBackground *background) surface = gdk_window_create_similar_surface (background->window, CAIRO_CONTENT_COLOR_ALPHA, width, height); - if (cairo_surface_status (surface)) { + if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS) { cairo_surface_destroy (surface); return NULL; } -- cgit v1.2.1