Mercurial > MadButterfly
diff 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 |
line wrap: on
line diff
--- a/src/paint.c Fri Dec 03 01:27:24 2010 +0800 +++ b/src/paint.c Fri Dec 03 08:49:00 2010 +0800 @@ -202,7 +202,8 @@ radial->stops, radial->n_stops); ASSERT(ptn != NULL); - mbe_pattern_destroy(radial->ptn); + if(radial->ptn) + mbe_pattern_destroy(radial->ptn); radial->ptn = ptn; } mbe_set_source(cr, radial->ptn);