diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-19 13:55:28 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-19 13:55:28 +0000 |
commit | 4978d4cd142fd3fa4f17daf9db2f95ef36791c4e (patch) | |
tree | bb8558191b8f24195e03781380cce85778baae43 /src/core | |
parent | 78f9c141dc82a5e1b68023e65081428e328183b8 (diff) | |
download | irssi-4978d4cd142fd3fa4f17daf9db2f95ef36791c4e.zip |
Irssi printed GLib error if no PATH was set..
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2081 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/session.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/session.c b/src/core/session.c index 40cba014..fc5daa18 100644 --- a/src/core/session.c +++ b/src/core/session.c @@ -54,7 +54,10 @@ void session_set_binary(const char *path) } /* we'll need to find it from path. */ - paths = g_strsplit(g_getenv("PATH"), ":", -1); + str = g_getenv("PATH"); + if (str == NULL) return; + + paths = g_strsplit(str, ":", -1); for (tmp = paths; *tmp != NULL; tmp++) { str = g_strconcat(*tmp, G_DIR_SEPARATOR_S, path, NULL); if (access(str, X_OK) == 0) { |