Index: generic/nsf.c =================================================================== diff -u -r242d5780b82de4363cd774a29ff7296270cdf0d0 -r16ca3e52fc75fbe269eab93eec52c9749acd266c --- generic/nsf.c (.../nsf.c) (revision 242d5780b82de4363cd774a29ff7296270cdf0d0) +++ generic/nsf.c (.../nsf.c) (revision 16ca3e52fc75fbe269eab93eec52c9749acd266c) @@ -26397,6 +26397,7 @@ * parameter definitions) and the defaults are set. Now we have to apply the * arguments (mostly setting instance variables). */ + #if defined(CONFIGURE_ARGS_TRACE) fprintf(stderr, "*** POPULATE OBJ '%s': nr of parsed args %d\n", ObjectName(object), pc.objc); #endif @@ -26494,6 +26495,7 @@ result = NsfCallMethodWithArgs(interp, (Nsf_Object *)slotObject, NsfGlobalObjs[NSF_INITIALIZE], object->cmdName, 2, ov, NSF_CSC_IMMEDIATE|NSF_CM_IGNORE_PERMISSIONS); + } if (result != TCL_OK) { /* @@ -26540,6 +26542,7 @@ uplevelVarFramePtr, initString, objv[pc.lastObjc], (Tcl_Obj **)&objv[pc.lastObjc + 1], objc - pc.lastObjc); + if (result != TCL_OK) { Nsf_PopFrameObj(interp, framePtr); goto configure_exit; @@ -27054,7 +27057,7 @@ switch (isdasharg) { case SKALAR_DASH: /* Argument is a skalar with a leading dash */ { int j; - + nextMethodName = NULL; nextArgv = NULL; nextArgc = 0; @@ -27101,10 +27104,13 @@ */ result = DispatchInitMethod(interp, object, normalArgs, objv+1, 0); - /* - * Return the non-processed leading arguments (XOTcl convention). - */ - Tcl_SetObjResult(interp, Tcl_NewListObj(normalArgs, objv+1)); + if (result == TCL_OK) { + /* + * Return the non-processed leading arguments unless there was an error + * (XOTcl convention) + */ + Tcl_SetObjResult(interp, Tcl_NewListObj(normalArgs, objv+1)); + } return result; }