changeset 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 af74a96e6624
children e9d8194fcff0
files src/graph_engine_openvg.c src/paint.c
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/graph_engine_openvg.c	Fri Dec 03 01:27:24 2010 +0800
+++ b/src/graph_engine_openvg.c	Fri Dec 03 08:49:00 2010 +0800
@@ -191,7 +191,7 @@
  */
 static void
 _ge_vg_img_deactivate_for_surface(void *obj) {
-    NOT_IMPLEMENT("_ge_vg_img_deactivate_for_surface");
+    /* NOT_IMPLEMENT("_ge_vg_img_deactivate_for_surface"); */
 }
 
 /*! \brief Activate a VGImage for a surface
--- 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);