[gegl/soc-2012-ops: 8/58] Shift Operation: Fix mutex.



commit 39c2c8f4d85b396fa605b80246c2e0856029acaa
Author: Hans Lo <hansshulo gmail com>
Date:   Wed Jun 27 22:56:33 2012 -0400

    Shift Operation: Fix mutex.

 operations/common/shift.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/operations/common/shift.c b/operations/common/shift.c
index 4d39071..0303a76 100644
--- a/operations/common/shift.c
+++ b/operations/common/shift.c
@@ -115,9 +115,9 @@ process (GeglOperation       *operation,
   gint r;
 
   /* calculate offsets once */
+  g_static_mutex_lock (&mutex);
   if (!o->chant_data)
     {
-      g_static_mutex_lock (&mutex);
       boundary = gegl_operation_source_get_bounding_box (operation, "input");
 
       if (boundary)
@@ -143,9 +143,8 @@ process (GeglOperation       *operation,
 	    }
 	  o->chant_data = offsets;
 	}
-      g_static_mutex_unlock (&mutex);
     }
-  
+  g_static_mutex_unlock (&mutex);
   offsets = (GArray*) o->chant_data;
 
   src_rect.x      = result->x - op_area->left;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]