2011-07-04 17:44:29 +02:00
|
|
|
--- src/cmd/ksh93/sh/xec.c
|
2013-02-05 18:51:33 +01:00
|
|
|
+++ src/cmd/ksh93/sh/xec.c 2011-07-04 15:42:21.000000000 +0000
|
2016-10-12 13:36:28 +02:00
|
|
|
@@ -3387,7 +3387,8 @@ int sh_funscope(int argn, char *argv[],i
|
2011-09-02 14:19:30 +02:00
|
|
|
shp->st.var_local = shp->var_tree;
|
2011-07-04 17:44:29 +02:00
|
|
|
if(!fun)
|
|
|
|
{
|
|
|
|
- shp->st.filename = fp->node->nvalue.rp->fname;
|
|
|
|
+ if (fp->node->nvalue.rp)
|
|
|
|
+ shp->st.filename = fp->node->nvalue.rp->fname;
|
|
|
|
shp->st.funname = nv_name(fp->node);
|
|
|
|
shp->last_root = nv_dict(DOTSHNOD);
|
|
|
|
nv_putval(SH_PATHNAMENOD,shp->st.filename,NV_NOFREE);
|