From 4978d4cd142fd3fa4f17daf9db2f95ef36791c4e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 19 Nov 2001 13:55:28 +0000 Subject: [PATCH] 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 --- src/core/session.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) {