summaryrefslogtreecommitdiff
path: root/src/cairo-quartz-image-surface.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-05-10 00:58:07 +0200
committerBehdad Esfahbod <behdad@behdad.org>2008-05-10 01:21:44 +0200
commit74eea0f297a62be5aba84b7482832485d11995e1 (patch)
tree56d22804775d1d701e1b4365e3c1091de8a94a2c /src/cairo-quartz-image-surface.c
parentdca892c83ea7d115fba0ce66a69464c36cadf74c (diff)
[cairo-quartz-image-surface] Remove one abuse of out-of-memory status
Vlad, you need to stop throwing random OOM errors...
Diffstat (limited to 'src/cairo-quartz-image-surface.c')
-rw-r--r--src/cairo-quartz-image-surface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-quartz-image-surface.c b/src/cairo-quartz-image-surface.c
index e0c69a91..c3f73d11 100644
--- a/src/cairo-quartz-image-surface.c
+++ b/src/cairo-quartz-image-surface.c
@@ -43,6 +43,7 @@
#include "cairo-quartz-private.h"
#define SURFACE_ERROR_NO_MEMORY (_cairo_surface_create_in_error(_cairo_error(CAIRO_STATUS_NO_MEMORY)))
+#define SURFACE_ERROR_TYPE_MISMATCH (_cairo_surface_create_in_error(_cairo_error(CAIRO_STATUS_SURFACE_TYPE_MISMATCH)))
#define SURFACE_ERROR_INVALID_FORMAT (_cairo_surface_create_in_error(_cairo_error(CAIRO_STATUS_INVALID_FORMAT)))
CGImageRef
@@ -300,7 +301,7 @@ cairo_quartz_image_surface_create (cairo_surface_t *image_surface)
unsigned char *data;
if (cairo_surface_get_type(image_surface) != CAIRO_SURFACE_TYPE_IMAGE)
- return SURFACE_ERROR_NO_MEMORY;
+ return SURFACE_ERROR_TYPE_MISMATCH;
image_surface = (cairo_image_surface_t*) image_surface;
width = image_surface->width;