'Fix' a NULL pointer 'dereference' in cairo-pdf-surface
The expression &image_surface->base basically just casts the cairo_image_surface_t* to cairo_surface_t*. However, technically it is a NULL pointer dereference and UndefinedBehaviorSanitizer flags it as such:
runtime error: member access within null pointer of type 'cairo_image_surface_t' (aka 'struct _cairo_image_surface')
This commit fixes this by adding a NULL check.
Signed-off-by: Uli Schlachter psychon@znc.in