[cairo-commit] src/cairo-recording-surface.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Apr 30 02:33:45 PDT 2010
src/cairo-recording-surface.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 905c345df1f828551af2ab0b751388428e4dfaf6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Apr 30 10:31:50 2010 +0100
recording: Check that we do not use a finished recording surface.
User paranoia - as the replay is exposed to the user it is convenient to
add the finish check in the core replay function so that we gain a
paranoia check for the internal paths as well.
diff --git a/src/cairo-recording-surface.c b/src/cairo-recording-surface.c
index 35fe6b1..5a2f804 100644
--- a/src/cairo-recording-surface.c
+++ b/src/cairo-recording-surface.c
@@ -801,7 +801,10 @@ _cairo_recording_surface_replay_internal (cairo_surface_t *surface,
return surface->status;
if (unlikely (target->status))
- return _cairo_surface_set_error (surface, target->status);
+ return target->status;
+
+ if (unlikely (surface->finished))
+ return _cairo_error (CAIRO_STATUS_SURFACE_FINISHED);
assert (_cairo_surface_is_recording (surface));
More information about the cairo-commit
mailing list