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.
This commit is contained in:
Cedric BAIL 2015-10-12 14:00:01 -07:00
parent 412d311830
commit ec909b4d6a
1 changed files with 3 additions and 3 deletions

View File

@ -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