summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2011-01-06 21:57:23 +0900
committerAkira TAGOH <akira@tagoh.org>2011-01-06 21:57:23 +0900
commit774ba3bf6c77c10d317a59b9d19f37b5c70101ab (patch)
tree194555b3b6c5c09cf7812fdbc14cd960d184c5a6
parenteaf9ef5bb76f68b3ab8b1285f5b28edec847bb55 (diff)
unlock object at the end
-rw-r--r--devices/cairo/cairo-main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/devices/cairo/cairo-main.c b/devices/cairo/cairo-main.c
index 51b7523..912c541 100644
--- a/devices/cairo/cairo-main.c
+++ b/devices/cairo/cairo-main.c
@@ -541,6 +541,7 @@ _hg_cairo_device_fill(hg_device_t *device,
hg_path_t *path;
hg_matrix_t mtx;
XRectangle r;
+ gboolean retval = TRUE;
hg_return_val_if_lock_fail (path,
gstate->o.mem,
@@ -550,8 +551,10 @@ _hg_cairo_device_fill(hg_device_t *device,
hg_gstate_get_ctm(gstate, &mtx);
_hg_cairo_device_set_ctm(cdev, &mtx);
cairo_new_path(cdev->cr);
- if (!hg_path_operate(path, &__vtable, cdev->cr, NULL))
- return FALSE;
+ if (!hg_path_operate(path, &__vtable, cdev->cr, NULL)) {
+ retval = FALSE;
+ goto finalize;
+ }
_hg_cairo_device_set_color(cdev, &gstate->color);
cairo_set_fill_rule(cdev->cr, CAIRO_FILL_RULE_WINDING);
@@ -569,6 +572,8 @@ _hg_cairo_device_fill(hg_device_t *device,
}
G_UNLOCK (cairo);
+ finalize:
+ hg_mem_unlock_object(gstate->o.mem, qpath);
return TRUE;
}