forked from enlightenment/efl
Make eina rectangle handle NULL case.
SVN revision: 37328
This commit is contained in:
parent
c1d2134caf
commit
8748f83f01
|
@ -226,6 +226,7 @@ eina_rectangle_pool_delete(Eina_Rectangle_Pool *pool)
|
|||
{
|
||||
Eina_Rectangle_Alloc *del;
|
||||
|
||||
if (!pool) return ;
|
||||
while (pool->head)
|
||||
{
|
||||
del = (Eina_Rectangle_Alloc*) pool->head;
|
||||
|
@ -241,6 +242,7 @@ eina_rectangle_pool_delete(Eina_Rectangle_Pool *pool)
|
|||
EAPI int
|
||||
eina_rectangle_pool_count(Eina_Rectangle_Pool *pool)
|
||||
{
|
||||
if (!pool) return 0;
|
||||
return pool->references;
|
||||
}
|
||||
|
||||
|
@ -253,6 +255,7 @@ eina_rectangle_pool_request(Eina_Rectangle_Pool *pool, int w, int h)
|
|||
int x;
|
||||
int y;
|
||||
|
||||
if (!pool) return NULL;
|
||||
if (w > pool->w || h > pool->h) return NULL;
|
||||
|
||||
test = _eina_rectangle_pool_find((Eina_Rectangle_Alloc*) pool->head, pool->w, pool->h, w, h, &x, &y);
|
||||
|
|
Loading…
Reference in New Issue