Commit 3e38920b authored by awaw fumin's avatar awaw fumin Committed by Daniel Sabo

Fix a bad unref and a memory leak

parent 040b2e21
......@@ -187,6 +187,7 @@ gegl_sc_context_update_from_outline (GeglScContext *self,
if (self->mesh != NULL)
{
p2tr_mesh_clear (self->mesh);
p2tr_mesh_unref (self->mesh);
self->mesh = NULL;
}
......@@ -778,7 +779,7 @@ gegl_sc_context_free (GeglScContext *context)
* The reason is because the N points in context->mesh holds N references
* back to context->mesh itself, and an initiative to break these circular
* references is needed. */
p2tr_mesh_clear(context->mesh);
p2tr_mesh_clear (context->mesh);
p2tr_mesh_unref (context->mesh);
gegl_sc_outline_free (context->outline);
......
......@@ -245,8 +245,6 @@ gegl_sc_mesh_sampling_entry_free_hfunc (gpointer point,
gpointer sampling_list,
gpointer unused)
{
/* Unref the point returned from triangulation_get_points */
p2tr_point_unref ((P2trPoint*)point);
/* Free the sampling list */
gegl_sc_sample_list_free ((GeglScSampleList*)sampling_list);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment