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



commit 108dd4571372fa2095b5b5b49e26c801d063c72a
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]