diff options
author | dgp <dgp@users.sourceforge.net> | 2011-04-21 13:47:48 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-04-21 13:47:48 (GMT) |
commit | 6998aa298515d30c3b2e0cee78e2af476fd2ed91 (patch) | |
tree | 6159f577b200fa32f4575a1ead43307fa7ff8f7f /generic/tclIndexObj.c | |
parent | 4779fe18796c2f1adad2712560bc0cfe35e844be (diff) | |
parent | 7814414e5c501546b9abc27e7d5016acb7a9ff03 (diff) | |
download | tcl-6998aa298515d30c3b2e0cee78e2af476fd2ed91.zip tcl-6998aa298515d30c3b2e0cee78e2af476fd2ed91.tar.gz tcl-6998aa298515d30c3b2e0cee78e2af476fd2ed91.tar.bz2 |
Make sure SetFooFromAny routines react reasonably when passed a NULL interp.
Diffstat (limited to 'generic/tclIndexObj.c')
-rw-r--r-- | generic/tclIndexObj.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index d98842e..99bd61f 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -410,9 +410,11 @@ SetIndexFromAny( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ register Tcl_Obj *objPtr) /* The object to convert. */ { + if (interp) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't convert value to index except via Tcl_GetIndexFromObj API", -1)); + } return TCL_ERROR; } |