diff options
Diffstat (limited to 'src/cairo-array.c')
-rw-r--r-- | src/cairo-array.c | 5 |
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++) { |