From 95fae80658cd13ecd1544095905ec68c14238af4 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Thu, 13 Feb 2014 15:37:15 +0900 Subject: [PATCH] pic->envp is nullable --- src/system.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/system.c b/src/system.c index 8c8ce084..c8d2ac7b 100644 --- a/src/system.c +++ b/src/system.c @@ -103,6 +103,10 @@ pic_system_getenvs(pic_state *pic) pic_get_args(pic, ""); + if (! pic->envp) { + return pic_nil_value(); + } + for (envp = pic->envp; *envp; ++envp) { pic_value key, val; int i;