From: Johan Engelen Date: Sun, 14 Mar 2010 16:09:04 +0000 (+0100) Subject: Fixes crash of bug #537457, but export is incorrect. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0d10fe7c920eab44f20b92e75874062e834e30b2;p=inkscape.git Fixes crash of bug #537457, but export is incorrect. --- diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index c33beab8a..877bdb952 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -80,7 +80,7 @@ #include //#define TRACE(_args) g_printf _args -#define TRACE(_args) +#define TRACE(_args) g_message _args //#define TEST(_args) _args #define TEST(_args) @@ -662,7 +662,11 @@ CairoRenderContext::popLayer(void) surface_width *= 1.25; surface_height *= 1.25; } - mask_ctx->setupSurface( surface_width, surface_height ); + if (!mask_ctx->setupSurface( surface_width, surface_height )) { + TRACE(("mask: setupSurface failed\n")); + _renderer->destroyContext(mask_ctx); + return; + } TRACE(("mask surface: %f x %f at %i dpi\n", surface_width, surface_height, _dpi )); // set rendering mode to normal @@ -815,6 +819,7 @@ CairoRenderContext::setSurfaceTarget(cairo_surface_t *surface, bool is_vector, c bool CairoRenderContext::_finishSurfaceSetup(cairo_surface_t *surface, cairo_matrix_t *ctm) { +g_message("enter"); if(surface == NULL) { return false; } @@ -841,7 +846,7 @@ CairoRenderContext::_finishSurfaceSetup(cairo_surface_t *surface, cairo_matrix_t } _is_valid = TRUE; - +g_message("leave"); return true; }