diff options
Diffstat (limited to 'src/callproc.c')
-rw-r--r-- | src/callproc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/callproc.c b/src/callproc.c index 71071217208..25861602c85 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -1540,9 +1540,11 @@ getenv_internal (var, varlen, value, valuelen, frame) /* Find the environment in which to search the variable. */ if (!NILP (frame)) { + Lisp_Object local; + CHECK_FRAME (frame); frame = Fframe_with_environment (frame); - Lisp_Object local = get_frame_param (XFRAME (frame), Qenvironment); + local = get_frame_param (XFRAME (frame), Qenvironment); /* Use Vglobal_environment if there is no local environment. */ if (!NILP (local)) environment = local; |