summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ed9a279)
raw | patch | inline | side by side (parent: ed9a279)
author | theadib <theadib@users.sourceforge.net> | |
Wed, 2 Jan 2008 23:06:22 +0000 (23:06 +0000) | ||
committer | theadib <theadib@users.sourceforge.net> | |
Wed, 2 Jan 2008 23:06:22 +0000 (23:06 +0000) |
src/extension/internal/cairo-render-context.cpp | patch | blob | history |
diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp
index 1697719d716735596c97eec1d8dfbf94ee58fc26..3df9dff45da4c631414bb2a2c04364a678ef61e4 100644 (file)
case CAIRO_SURFACE_TYPE_PS:
surface = cairo_ps_surface_create_for_stream(Inkscape::Extension::Internal::_write_callback, _stream, width, height);
#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 5, 2))
+ if(CAIRO_STATUS_SUCCESS != cairo_surface_status(surface)) {
+ return FALSE;
+ }
cairo_ps_surface_restrict_to_level (surface, (cairo_ps_level_t)_ps_level);
#endif
break;
bool
CairoRenderContext::_finishSurfaceSetup(cairo_surface_t *surface)
{
+ if(surface == NULL) {
+ return FALSE;
+ }
+ if(CAIRO_STATUS_SUCCESS != cairo_surface_status(surface)) {
+ return FALSE;
+ }
+
_cr = cairo_create(surface);
_surface = surface;