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.
This commit is contained in:
Chris Wilson 2010-04-30 10:31:50 +01:00
parent 5fe7c5842f
commit 905c345df1

View file

@ -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));