summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <infirit@gmail.com>2014-11-23 14:02:22 +0100
committerinfirit <infirit@gmail.com>2014-11-23 14:02:22 +0100
commita3869cb7d3f16fe765249a54ddd61691de700768 (patch)
tree8a2ef87ae41f186723fd57027d8e3e372dd968c1
parentc0fd2c48d208511bcf7ea2cbe1a6cf16219653df (diff)
downloadmate-panel-a3869cb7d3f16fe765249a54ddd61691de700768.tar.bz2
mate-panel-a3869cb7d3f16fe765249a54ddd61691de700768.tar.xz
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
-rw-r--r--mate-panel/panel-background.c2
1 files changed, 1 insertions, 1 deletions
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;
}