evas_init() fails if eina_init() or evas_async_events_init() fail
SVN revision: 42239
This commit is contained in:
parent
ac3dae2a80
commit
eaf9934e80
|
@ -28,7 +28,6 @@ struct _Evas_Event_Async
|
|||
int
|
||||
evas_async_events_init(void)
|
||||
{
|
||||
#ifdef BUILD_ASYNC_EVENTS
|
||||
int filedes[2];
|
||||
|
||||
_init_evas_event++;
|
||||
|
@ -46,15 +45,11 @@ evas_async_events_init(void)
|
|||
fcntl(_fd_read, F_SETFL, O_NONBLOCK);
|
||||
|
||||
return _init_evas_event;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
evas_async_events_shutdown(void)
|
||||
{
|
||||
#ifdef BUILD_ASYNC_EVENTS
|
||||
_init_evas_event--;
|
||||
if (_init_evas_event > 0) return _init_evas_event;
|
||||
|
||||
|
@ -64,9 +59,6 @@ evas_async_events_shutdown(void)
|
|||
_fd_write = -1;
|
||||
|
||||
return _init_evas_event;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI int
|
||||
|
|
|
@ -9,15 +9,26 @@ evas_init(void)
|
|||
{
|
||||
if (initcount == 0)
|
||||
{
|
||||
eina_init();
|
||||
|
||||
if (!eina_init())
|
||||
return 0;
|
||||
evas_module_init();
|
||||
evas_async_events_init();
|
||||
#ifdef BUILD_ASYNC_EVENTS
|
||||
if (!evas_async_events_init())
|
||||
goto shutdown_module;
|
||||
#endif
|
||||
#ifdef EVAS_CSERVE
|
||||
if (getenv("EVAS_CSERVE")) evas_cserve_init();
|
||||
#endif
|
||||
}
|
||||
return ++initcount;
|
||||
|
||||
#ifdef BUILD_ASYNC_EVENTS
|
||||
shutdown_module:
|
||||
evas_module_shutdown();
|
||||
eina_shutdown();
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI int
|
||||
|
@ -29,7 +40,9 @@ evas_shutdown(void)
|
|||
#ifdef EVAS_CSERVE
|
||||
if (getenv("EVAS_CSERVE")) evas_cserve_shutdown();
|
||||
#endif
|
||||
#ifdef BUILD_ASYNC_EVENTS
|
||||
evas_async_events_shutdown();
|
||||
#endif
|
||||
evas_font_dir_cache_free();
|
||||
evas_common_shutdown();
|
||||
evas_module_shutdown();
|
||||
|
|
Loading…
Reference in New Issue