[cairo-commit] src/cairo-xcb-surface.c

Uli Schlachter psychon at kemper.freedesktop.org
Tue Mar 15 14:23:17 PDT 2011


 src/cairo-xcb-surface.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f6e6891b59656c944a7e758a53e07ed5f29f5c39
Author: Uli Schlachter <psychon at znc.in>
Date:   Tue Mar 15 19:41:41 2011 +0100

    xcb: Never return NULL from create_similar
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index c350f6f..ff8d9e6 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -186,10 +186,10 @@ _cairo_xcb_surface_create_similar (void			*abstract_other,
     cairo_status_t status;
 
     if (width > XLIB_COORD_MAX || height > XLIB_COORD_MAX)
-	return NULL;
+	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
 
     if (width <= 0 || height <= 0)
-	return NULL;
+	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
 
 #if CAIRO_HAS_DRM_SURFACE && CAIRO_HAS_XCB_DRM_FUNCTIONS
     if (other->drm != NULL) {


More information about the cairo-commit mailing list