Merge branch 'win32-get-dc' into 'master'

cairo_win32_surface_get_dc: Return NULL for error surfaces

Closes #405

See merge request cairo/cairo!106
This commit is contained in:
Heiko Lewin 2021-01-19 11:06:44 +00:00
commit d49d855819

View file

@ -155,6 +155,9 @@ _cairo_win32_surface_get_extents (void *abstract_surface,
HDC
cairo_win32_surface_get_dc (cairo_surface_t *surface)
{
if (surface->backend == NULL)
return NULL;
if (surface->backend->type == CAIRO_SURFACE_TYPE_WIN32)
return to_win32_surface(surface)->dc;