[gegl] operation: validate source bounding box before returning it
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] operation: validate source bounding box before returning it
- Date: Mon, 15 May 2017 21:27:44 +0000 (UTC)
commit 0efe329e048cf36638c39e28b1c8ddf6743b48e4
Author: Ell <ell_se yahoo com>
Date: Mon May 15 16:28:48 2017 -0400
operation: validate source bounding box before returning it
In gegl_operation_source_get_bounding_box(), make sure the source
node's bounding box is valid (otherwise, compute it) before
returning it.
Comment out the lock around node->mutex; it may be acquired by the
call to gegl_node_get_bounding_box(), causing a deadlock. This
lock is probably misplaced either way.
gegl/operation/gegl-operation.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gegl/operation/gegl-operation.c b/gegl/operation/gegl-operation.c
index 1286a25..5356420 100644
--- a/gegl/operation/gegl-operation.c
+++ b/gegl/operation/gegl-operation.c
@@ -378,9 +378,11 @@ gegl_operation_source_get_bounding_box (GeglOperation *operation,
if (node)
{
GeglRectangle *ret;
- g_mutex_lock (&node->mutex);
+ /* g_mutex_lock (&node->mutex); */
+ /* make sure node->have_rect is valid */
+ (void) gegl_node_get_bounding_box (node);
ret = &node->have_rect;
- g_mutex_unlock (&node->mutex);
+ /* g_mutex_unlock (&node->mutex); */
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]