Eina rectangle missing list init.
Rectangle needs the list module for the pool_new() function. Patch also adds a check for initialization error on the unit test. By: Andre Dieb SVN revision: 41460
This commit is contained in:
parent
940b7b0740
commit
14105484aa
|
@ -242,6 +242,12 @@ eina_rectangle_init(void)
|
|||
goto mempool_init_error;
|
||||
}
|
||||
|
||||
if (!eina_list_init())
|
||||
{
|
||||
EINA_ERROR_PERR("Could not initialize eina list module.\n");
|
||||
goto list_init_error;
|
||||
}
|
||||
|
||||
#ifdef EINA_DEFAULT_MEMPOOL
|
||||
choice = "pass_through";
|
||||
#else
|
||||
|
@ -267,6 +273,8 @@ eina_rectangle_init(void)
|
|||
return _eina_rectangle_init_count;
|
||||
|
||||
init_error:
|
||||
eina_list_shutdown();
|
||||
list_init_error:
|
||||
eina_mempool_shutdown();
|
||||
mempool_init_error:
|
||||
eina_error_shutdown();
|
||||
|
@ -281,6 +289,8 @@ eina_rectangle_shutdown(void)
|
|||
|
||||
if (_eina_rectangle_init_count) return _eina_rectangle_init_count;
|
||||
|
||||
eina_list_shutdown();
|
||||
|
||||
eina_mempool_del(_eina_rectangle_alloc_mp);
|
||||
eina_mempool_del(_eina_rectangle_mp);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ START_TEST(eina_rectangle_pool)
|
|||
int w;
|
||||
int h;
|
||||
|
||||
eina_rectangle_init();
|
||||
fail_if(!eina_rectangle_init());
|
||||
|
||||
pool = eina_rectangle_pool_new(256, 256);
|
||||
fail_if(pool == NULL);
|
||||
|
|
Loading…
Reference in New Issue