mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 09:58:12 +02:00
[cairo-quartz-image-surface] Remove one abuse of out-of-memory status
Vlad, you need to stop throwing random OOM errors...
This commit is contained in:
parent
dca892c83e
commit
74eea0f297
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue