summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore/ecore_glib.c
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/ecore/src/lib/ecore/ecore_glib.c')
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_glib.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/legacy/ecore/src/lib/ecore/ecore_glib.c b/legacy/ecore/src/lib/ecore/ecore_glib.c
index a4db0ab568..363b4d0a5d 100644
--- a/legacy/ecore/src/lib/ecore/ecore_glib.c
+++ b/legacy/ecore/src/lib/ecore/ecore_glib.c
@@ -184,11 +184,15 @@ _ecore_glib_select(int ecore_fds,
184 fd_set *efds, 184 fd_set *efds,
185 struct timeval *ecore_timeout) 185 struct timeval *ecore_timeout)
186{ 186{
187 GStaticMutex lock = G_STATIC_MUTEX_INIT; 187 GStaticMutex lock;
188 GMutex *mutex = g_static_mutex_get_mutex(&lock); 188 GMutex *mutex;
189 GMainContext *ctx = g_main_context_default(); 189 GMainContext *ctx;
190 int ret; 190 int ret;
191 191
192 g_static_mutex_init(&lock);
193 mutex = g_static_mutex_get_mutex(&lock);
194 ctx = g_main_context_default();
195
192 if (g_main_context_acquire(ctx)) 196 if (g_main_context_acquire(ctx))
193 { 197 {
194 if (mutex) g_mutex_lock(mutex); 198 if (mutex) g_mutex_lock(mutex);