eina: move the _eina_main_loop set before we init anything

otherwise we could get into problems.

fix T4891

@fix
This commit is contained in:
Marcel Hollerbach 2017-02-28 11:46:56 +01:00
parent 1974f5d511
commit 86fe6609c2
1 changed files with 5 additions and 4 deletions

View File

@ -258,6 +258,11 @@ eina_init(void)
mtrace();
}
#endif
#ifdef EFL_HAVE_THREADS
_eina_main_loop = pthread_self();
#endif
eina_freeq_main_set(eina_freeq_new(EINA_FREEQ_DEFAULT));
if (!eina_log_init())
@ -274,10 +279,6 @@ eina_init(void)
return 0;
}
#ifdef EFL_HAVE_THREADS
_eina_main_loop = pthread_self();
#endif
#ifdef EINA_HAVE_DEBUG_THREADS
pthread_mutex_init(&_eina_tracking_lock, NULL);