Bug 630096: Fix cairo_d2d_finish destruction order. r=jrmuizel a=joedrew

This commit is contained in:
Bas Schouten 2011-01-31 17:18:28 +01:00
Родитель 19269322e3
Коммит 5fa3296991
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -2450,8 +2450,11 @@ _cairo_d2d_finish(void *surface)
reset_clip(d2dsurf);
cairo_release_device(&d2dsurf->device->base);
// We need to release the device after calling the constructor, since the
// device destruction may release the D3D/D2D libraries.
cairo_device_t *device = &d2dsurf->device->base;
d2dsurf->~cairo_d2d_surface_t();
cairo_release_device(device);
return CAIRO_STATUS_SUCCESS;
}