eina-inlist - handle prepend/append relative if list is null (empty)

stable release - cherry-pick me!
This commit is contained in:
Carsten Haitzler 2014-01-20 15:16:56 +09:00
parent f8b0322704
commit 20d0015470
1 changed files with 2 additions and 2 deletions

View File

@ -277,7 +277,7 @@ eina_inlist_append_relative(Eina_Inlist *list,
{
EINA_SAFETY_ON_NULL_RETURN_VAL(new_l, list);
if (relative)
if ((relative) && (list))
{
if (relative->next)
{
@ -305,7 +305,7 @@ eina_inlist_prepend_relative(Eina_Inlist *list,
{
EINA_SAFETY_ON_NULL_RETURN_VAL(new_l, list);
if (relative)
if ((relative) && (list))
{
new_l->prev = relative->prev;
new_l->next = relative;