summaryrefslogtreecommitdiff
path: root/src/cairo-array.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-07-27 15:39:34 +0000
committerCarl Worth <cworth@cworth.org>2005-07-27 15:39:34 +0000
commit2b5d9c8e007f4198b1c48bce53491842f065a759 (patch)
tree3b2cf306a63ef8d18117c69a52ca419a581c12c3 /src/cairo-array.c
parentc884c4c541abe380500e24a55ec017677d56db19 (diff)
Add CAIRO_STATUS_INVALID_CONTENT, CAIRO_STATUS_INVALID_FORMAT, and CAIRO_STATUS_INVALID_VISUAL.
Change functions to return type of void: cairo_scaled_font_extents cairo_surface_finish Add new functions to query object status: cairo_scaled_font_status cairo_surface_status Implementation of new error handling scheme for cairo_surface_t and cairo_scaled_font_t. Track change in return value of cairo_surface_finish.
Diffstat (limited to 'src/cairo-array.c')
-rw-r--r--src/cairo-array.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cairo-array.c b/src/cairo-array.c
index a9f148a0..ef7f77fc 100644
--- a/src/cairo-array.c
+++ b/src/cairo-array.c
@@ -198,6 +198,11 @@ _cairo_user_data_array_get_data (cairo_user_data_array_t *array,
int i, num_slots;
cairo_user_data_slot_t *slots;
+ /* We allow this to support degenerate objects such as
+ * cairo_image_surface_nil. */
+ if (array == NULL)
+ return NULL;
+
num_slots = array->num_elements;
slots = (cairo_user_data_slot_t *) array->elements;
for (i = 0; i < num_slots; i++) {