From: buliabyak Date: Thu, 12 Jun 2008 02:43:08 +0000 (+0000) Subject: patch 181692 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=40f0cd330f34a1e77016dd00d9a1c60d1af41528;p=inkscape.git patch 181692 --- diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index 887ffe602..3ec94af63 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -788,6 +788,8 @@ CairoRenderContext::finish(void) cairo_show_page(_cr); cairo_destroy(_cr); + cairo_surface_finish(_surface); + cairo_status_t status = cairo_surface_status(_surface); cairo_surface_destroy(_surface); _cr = NULL; _surface = NULL; @@ -805,7 +807,10 @@ CairoRenderContext::finish(void) _stream = NULL; } - return true; + if (status == CAIRO_STATUS_SUCCESS) + return true; + else + return false; } void diff --git a/src/extension/internal/pdf-cairo.cpp b/src/extension/internal/pdf-cairo.cpp index 92b8d92c4..ed6eee546 100644 --- a/src/extension/internal/pdf-cairo.cpp +++ b/src/extension/internal/pdf-cairo.cpp @@ -383,6 +383,8 @@ PrintCairoPDF::finish(Inkscape::Extension::Print *mod) cairo_show_page(cr); cairo_destroy(cr); + cairo_surface_finish(pdf_surface); + cairo_status_t status = cairo_surface_status(pdf_surface); cairo_surface_destroy(pdf_surface); cr = NULL; pdf_surface = NULL; @@ -394,7 +396,10 @@ PrintCairoPDF::finish(Inkscape::Extension::Print *mod) fclose(_stream); _stream = 0; - return 1; + if (status == CAIRO_STATUS_SUCCESS) + return true; + else + return false; } unsigned int