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



commit 07747de61c0e47f90abbaa37e0b45f4f89e53b66
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]