summaryrefslogtreecommitdiff
path: root/src/lib/efreet
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-21 17:02:43 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-21 17:02:43 +0900
commitb8a760ed58993a84458eb9eda6170ee1a0f76036 (patch)
tree01145cf3df3ac2cf7a7e57785b53ded8abf375e1 /src/lib/efreet
parent97c3eedbabc2fdaa989ead0e26be76dd74e02f0c (diff)
efreet - dont complain if INTERNAL x extension hash of desktop is NULL
asking for an x- field from a desktop shouldnt result in null safety checks IF the x hash is null - it's fine if it's null - that field just doesn't eixst. if other fields were in the x hash but the desired one wasn't it'd not complain, so why complain if there is just no x hash?
Diffstat (limited to 'src/lib/efreet')
-rw-r--r--src/lib/efreet/efreet_desktop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/efreet/efreet_desktop.c b/src/lib/efreet/efreet_desktop.c
index 78d0f514cb..4a4f4d1564 100644
--- a/src/lib/efreet/efreet_desktop.c
+++ b/src/lib/efreet/efreet_desktop.c
@@ -534,8 +534,8 @@ efreet_desktop_x_field_get(Efreet_Desktop *desktop, const char *key)
534 const char *ret; 534 const char *ret;
535 535
536 EINA_SAFETY_ON_NULL_RETURN_VAL(desktop, NULL); 536 EINA_SAFETY_ON_NULL_RETURN_VAL(desktop, NULL);
537 EINA_SAFETY_ON_NULL_RETURN_VAL(desktop->x, NULL);
538 EINA_SAFETY_ON_TRUE_RETURN_VAL(strncmp(key, "X-", 2), NULL); 537 EINA_SAFETY_ON_TRUE_RETURN_VAL(strncmp(key, "X-", 2), NULL);
538 if (!desktop->x) return NULL;
539 539
540 eina_lock_take(&_lock); 540 eina_lock_take(&_lock);
541 ret = eina_hash_find(desktop->x, key); 541 ret = eina_hash_find(desktop->x, key);
@@ -557,7 +557,7 @@ efreet_desktop_x_field_del(Efreet_Desktop *desktop, const char *key)
557 Eina_Bool ret; 557 Eina_Bool ret;
558 EINA_SAFETY_ON_NULL_RETURN_VAL(desktop, EINA_FALSE); 558 EINA_SAFETY_ON_NULL_RETURN_VAL(desktop, EINA_FALSE);
559 EINA_SAFETY_ON_TRUE_RETURN_VAL(strncmp(key, "X-", 2), EINA_FALSE); 559 EINA_SAFETY_ON_TRUE_RETURN_VAL(strncmp(key, "X-", 2), EINA_FALSE);
560 EINA_SAFETY_ON_NULL_RETURN_VAL(desktop->x, EINA_FALSE); 560 if (!desktop->x) return EINA_FALSE;
561 561
562 eina_lock_take(&_lock); 562 eina_lock_take(&_lock);
563 ret = eina_hash_del_by_key(desktop->x, key); 563 ret = eina_hash_del_by_key(desktop->x, key);