From 6ec24760b32da5ca1f0a67f6ff344b91f8bc020c Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Tue, 5 Jul 2011 21:37:40 +0200 Subject: [PATCH] device: Flush on a finished device is a no-op In order to have a behavior which is coherent with that of surfaces, flushing a finished devices should be a no-op and should not affect the status of the device. --- src/cairo-device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cairo-device.c b/src/cairo-device.c index c6405478a..fd1ec71de 100644 --- a/src/cairo-device.c +++ b/src/cairo-device.c @@ -256,6 +256,9 @@ cairo_device_flush (cairo_device_t *device) if (device == NULL || device->status) return; + if (device->finished) + return; + if (device->backend->flush != NULL) { status = device->backend->flush (device); if (unlikely (status))