diff options
author | dgp <dgp@noemail.net> | 2011-04-21 13:47:48 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2011-04-21 13:47:48 (GMT) |
commit | 67e50a2085da9cf3879963bfdc831f1bb054fa71 (patch) | |
tree | 6159f577b200fa32f4575a1ead43307fa7ff8f7f /generic/tclIndexObj.c | |
parent | 98800f0eda0647431a578cb25987827538b73ec7 (diff) | |
parent | 8ffca00c252fc6b8bd5a411c2d0db20a45adfb71 (diff) | |
download | tcl-67e50a2085da9cf3879963bfdc831f1bb054fa71.zip tcl-67e50a2085da9cf3879963bfdc831f1bb054fa71.tar.gz tcl-67e50a2085da9cf3879963bfdc831f1bb054fa71.tar.bz2 |
Make sure SetFooFromAny routines react reasonably when passed a NULL interp.
FossilOrigin-Name: 36b0307ba2ada5375598e444799d6f9fd0edb46b
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; } |