diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c index d97c3a4cce2..3343abfd4f0 100644 --- a/gfx/cairo/cairo/src/cairo-win32-font.c +++ b/gfx/cairo/cairo/src/cairo-win32-font.c @@ -894,19 +894,21 @@ _flush_glyphs (cairo_glyph_state_t *state) cairo_status_t status; int dx = 0; WCHAR * elements; + int * dx_elements; status = _cairo_array_append (&state->dx, &dx); if (status) return status; elements = _cairo_array_index (&state->glyphs, 0); + dx_elements = _cairo_array_index (&state->dx, 0); if (!ExtTextOutW (state->hdc, state->start_x, state->last_y, ETO_GLYPH_INDEX, NULL, elements, state->glyphs.num_elements, - (int *)state->dx.elements)) { + dx_elements)) { return _cairo_win32_print_gdi_error ("_flush_glyphs"); }