* Source/cairo/CairoGState.m (-drawGState:...): Check that the source

context is non-NULL before calling cairo_get_target on it. Log a warning
when either the source context or target context is NULL.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33828 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2011-09-12 00:46:15 +00:00
parent ee87a3db27
commit ea5cc1646e
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2011-09-11 Eric Wasylishen <ewasylishen@gmail.com>
* Source/cairo/CairoGState.m (-drawGState:...): Check that the source
context is non-NULL before calling cairo_get_target on it. Log a warning
when either the source context or target context is NULL.
2011-08-16 Eric Wasylishen <ewasylishen@gmail.com>
* Source/cairo/CairoGState.m (-drawGState:...): Use CAIRO_EXTEND_PAD

View file

@ -1341,7 +1341,7 @@ doesn't support to use the receiver cairo target as the source. */
fraction: (float)delta
{
NSAffineTransformStruct tstruct = [ctm transformStruct];
cairo_surface_t *src = cairo_get_target(source->_ct);
cairo_surface_t *src;
double width, height;
double x, y;
cairo_pattern_t *cpattern;
@ -1350,9 +1350,13 @@ doesn't support to use the receiver cairo target as the source. */
if (!_ct || !source->_ct)
{
NSLog(@"WARNING: -drawGState called with a NULL target context (%p) or source context (%p)",
_ct, source->_ct);
return;
}
src = cairo_get_target(source->_ct);
cairo_save(_ct);
cairo_new_path(_ct);