Index: generic/tclCmdMZ.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclCmdMZ.c,v
retrieving revision 1.82.2.13
diff -u -r1.82.2.13 tclCmdMZ.c
--- generic/tclCmdMZ.c	15 Nov 2004 21:14:32 -0000	1.82.2.13
+++ generic/tclCmdMZ.c	8 Mar 2005 23:34:04 -0000
@@ -4263,7 +4263,6 @@
     ActiveInterpTrace active;
     int curLevel;
     int traceCode = TCL_OK;
-    TraceCommandInfo* tcmdPtr;
     
     if (command == NULL || iPtr->tracePtr == NULL ||
            (iPtr->flags & INTERP_TRACE_IN_PROGRESS)) {
@@ -4313,16 +4312,16 @@
 	    
 	    if (tracePtr->flags & (TCL_TRACE_ENTER_EXEC | TCL_TRACE_LEAVE_EXEC)) {
 	        /* New style trace */
-		if ((tracePtr->flags != TCL_TRACE_EXEC_IN_PROGRESS) &&
-		    ((tracePtr->flags & traceFlags) != 0)) {
-		    tcmdPtr = (TraceCommandInfo*)tracePtr->clientData;
-		    tcmdPtr->curFlags = traceFlags;
-		    tcmdPtr->curCode  = code;
-		    traceCode = (tracePtr->proc)((ClientData)tcmdPtr, 
-						 (Tcl_Interp*)interp,
-						 curLevel, command,
-						 (Tcl_Command)cmdPtr,
-						 objc, objv);
+		if (tracePtr->flags & traceFlags) {
+		    if (tracePtr->proc == TraceExecutionProc) {
+			TraceCommandInfo *tcmdPtr =
+				(TraceCommandInfo *) tracePtr->clientData;
+			tcmdPtr->curFlags = traceFlags;
+			tcmdPtr->curCode  = code;
+		    }
+		    traceCode = (tracePtr->proc)(tracePtr->clientData, 
+			    interp, curLevel, command, (Tcl_Command)cmdPtr,
+			    objc, objv);
 		}
 	    } else {
 		/* Old-style trace */
