diff options
author | Steve Chaplin <> | 2011-03-28 11:21:23 +0800 |
---|---|---|
committer | Steve Chaplin <> | 2011-03-28 11:21:23 +0800 |
commit | 223a51feefbb99233bed8096779c576bda6fb0ad (patch) | |
tree | 6aa66677a9a85964e71d9054b340c72e52523dc0 | |
parent | c8e0d19ac0129b2e13741df6ca8b6d7aa495850f (diff) | |
download | pycairo-223a51feefbb99233bed8096779c576bda6fb0ad.tar.gz |
Fix for bug #33013.
-rw-r--r-- | src/pattern.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pattern.c b/src/pattern.c index 61ae1c5..9daf5c4 100644 --- a/src/pattern.c +++ b/src/pattern.c @@ -287,14 +287,14 @@ surface_pattern_get_filter (PycairoSurfacePattern *o) { static PyObject * surface_pattern_get_surface (PycairoSurfacePattern *o) { - /* + if (o->base != NULL) { + // surface_pattern was created using surface_pattern_new() + return Py_BuildValue("O", o->base); + } else { cairo_surface_t *surface; cairo_pattern_get_surface (o->pattern, &surface); - return PycairoSurface_FromSurface ( - cairo_surface_reference (surface), NULL); - */ - /* return the surface used to create the pattern */ - return Py_BuildValue("O", o->base); + return PycairoSurface_FromSurface(cairo_surface_reference (surface), NULL); + } } static PyObject * |