comparison src/paint.c @ 1083:555d89e704c0 openvg

Check if the pattern is NULL for free it for a radial paint
author Thinker K.F. Li <thinker@codemud.net>
date Fri, 03 Dec 2010 08:49:00 +0800
parents 7b4e80ab671a
children cd34de1a6960
comparison
equal deleted inserted replaced
1082:af74a96e6624 1083:555d89e704c0
200 cx, cy, 200 cx, cy,
201 radial->r, 201 radial->r,
202 radial->stops, 202 radial->stops,
203 radial->n_stops); 203 radial->n_stops);
204 ASSERT(ptn != NULL); 204 ASSERT(ptn != NULL);
205 mbe_pattern_destroy(radial->ptn); 205 if(radial->ptn)
206 mbe_pattern_destroy(radial->ptn);
206 radial->ptn = ptn; 207 radial->ptn = ptn;
207 } 208 }
208 mbe_set_source(cr, radial->ptn); 209 mbe_set_source(cr, radial->ptn);
209 } 210 }
210 211