From 610246c48f2834180eca90628c385350574b8c2c Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Thu, 12 Jan 2012 23:22:38 +0530 Subject: [PATCH] Modified function.cpp to use env_get_string(). --- function.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/function.cpp b/function.cpp index a9e1f6196..ddea8e869 100644 --- a/function.cpp +++ b/function.cpp @@ -153,8 +153,9 @@ static void autoload_names( array_list_t *out, int get_hidden ) int i; array_list_t path_list; - const wchar_t *path_var = env_get( L"fish_function_path" ); - + const wcstring path_var_wstr = env_get_string( L"fish_function_path" ); + const wchar_t *path_var = path_var_wstr.empty()?NULL:path_var_wstr.c_str(); + if( ! path_var ) return;