summaryrefslogtreecommitdiff
path: root/devel/glib2/patches/patch-ai
blob: a10529fc4a43326f1c18d0e8cb2100bd1583464d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$NetBSD: patch-ai,v 1.14 2007/11/25 23:38:53 wiz Exp $

--- glib/gmain.c.orig	2007-11-24 06:40:59.000000000 +0000
+++ glib/gmain.c
@@ -2636,13 +2636,13 @@ g_main_context_iterate (GMainContext *co
     {
       gboolean got_ownership;
       
+      LOCK_CONTEXT (context);
+
       g_return_val_if_fail (g_thread_supported (), FALSE);
 
       if (!block)
 	return FALSE;
 
-      LOCK_CONTEXT (context);
-      
       if (!context->cond)
 	context->cond = g_cond_new ();
           
@@ -2652,7 +2652,6 @@ g_main_context_iterate (GMainContext *co
 
       if (!got_ownership)
 	{
-	  UNLOCK_CONTEXT (context);
 	  return FALSE;
 	}
     }