cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ec909b4d6a1bf50e2f4e4be1096275ee14f6c0e4

commit ec909b4d6a1bf50e2f4e4be1096275ee14f6c0e4
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Mon Oct 12 14:00:01 2015 -0700

    ecore_con: be more defensive while using environment variable provided by 
the system.
    
    This fix a crash during make check for system where one of those string 
where not defined.
---
 src/tests/ecore_con/ecore_con_test_ecore_con.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/tests/ecore_con/ecore_con_test_ecore_con.c 
b/src/tests/ecore_con/ecore_con_test_ecore_con.c
index 67f3672..6618221 100644
--- a/src/tests/ecore_con/ecore_con_test_ecore_con.c
+++ b/src/tests/ecore_con/ecore_con_test_ecore_con.c
@@ -362,9 +362,9 @@ START_TEST(ecore_test_ecore_con_local_user_none)
    unsetenv("HOME");
    unsetenv("TMPDIR");
    _ecore_con_server_client_tests(ECORE_CON_LOCAL_USER, "test_sock", 
EINA_FALSE, 12345);
-   setenv("TMPDIR", tmp, 1);
-   setenv("HOME", homedir, 1);
-   setenv("XDG_RUNTIME_DIR", xdg_runtime_dir, 1);
+   if (tmp) setenv("TMPDIR", tmp, 1);
+   if (homedir) setenv("HOME", homedir, 1);
+   if (xdg_runtime_dir) setenv("XDG_RUNTIME_DIR", xdg_runtime_dir, 1);
 }
 END_TEST
 

-- 


Reply via email to