summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-01-20 15:16:56 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-01-20 15:18:21 +0900
commitb1de86ed525ee8704e2fbb70c12a6236b0279cc5 (patch)
tree97a553aa7b26992263da04cc6183446e02564cf7
parentcad0db51630df45378213bfcc33a236e930e0776 (diff)
eina-inlist - handle prepend/append relative if list is null (empty)
stable release - cherry-pick me!
-rw-r--r--src/lib/eina/eina_inlist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/eina/eina_inlist.c b/src/lib/eina/eina_inlist.c
index f2eb42b7b1..5c93b018ce 100644
--- a/src/lib/eina/eina_inlist.c
+++ b/src/lib/eina/eina_inlist.c
@@ -277,7 +277,7 @@ eina_inlist_append_relative(Eina_Inlist *list,
277{ 277{
278 EINA_SAFETY_ON_NULL_RETURN_VAL(new_l, list); 278 EINA_SAFETY_ON_NULL_RETURN_VAL(new_l, list);
279 279
280 if (relative) 280 if ((relative) && (list))
281 { 281 {
282 if (relative->next) 282 if (relative->next)
283 { 283 {
@@ -305,7 +305,7 @@ eina_inlist_prepend_relative(Eina_Inlist *list,
305{ 305{
306 EINA_SAFETY_ON_NULL_RETURN_VAL(new_l, list); 306 EINA_SAFETY_ON_NULL_RETURN_VAL(new_l, list);
307 307
308 if (relative) 308 if ((relative) && (list))
309 { 309 {
310 new_l->prev = relative->prev; 310 new_l->prev = relative->prev;
311 new_l->next = relative; 311 new_l->next = relative;