diff options
Diffstat (limited to 'generic/tclCmdIL.c')
| -rw-r--r-- | generic/tclCmdIL.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 0d88044..3742ba9 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -1201,9 +1201,6 @@ InfoFrameCmd( } framePtr = iPtr->cmdFramePtr; - if (!framePtr) { - goto levelError; - } while (++level <= 0) { framePtr = framePtr->nextPtr; if (!framePtr) { @@ -1272,9 +1269,14 @@ TclInfoFrame( static const char *const typeString[TCL_LOCATION_LAST] = { "eval", "eval", "eval", "precompiled", "source", "proc" }; - Proc *procPtr = framePtr->framePtr ? framePtr->framePtr->procPtr : NULL; + Proc *procPtr = NULL; int needsFree = -1; + if (!framePtr) { + goto precompiled; + } + procPtr = framePtr->framePtr ? framePtr->framePtr->procPtr : NULL; + /* * Pull the information and construct the dictionary to return, as list. * Regarding use of the CmdFrame fields see tclInt.h, and its definition. @@ -1302,11 +1304,11 @@ TclInfoFrame( break; case TCL_LOCATION_PREBC: + precompiled: /* * Precompiled. Result contains the type as signal, nothing else. */ - - ADD_PAIR("type", Tcl_NewStringObj(typeString[framePtr->type], -1)); + ADD_PAIR("type", Tcl_NewStringObj(typeString[TCL_LOCATION_PREBC], -1)); break; case TCL_LOCATION_BC: { @@ -1421,7 +1423,7 @@ TclInfoFrame( * _visible_ CallFrame. */ - if ((framePtr->framePtr != NULL) && (iPtr->varFramePtr != NULL)) { + if (framePtr && (framePtr->framePtr != NULL) && (iPtr->varFramePtr != NULL)) { CallFrame *current = framePtr->framePtr; CallFrame *top = iPtr->varFramePtr; CallFrame *idx; |
