Index: generic/tclTrace.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclTrace.c,v
retrieving revision 1.21
diff -u -r1.21 tclTrace.c
--- generic/tclTrace.c	15 Nov 2004 21:47:23 -0000	1.21
+++ generic/tclTrace.c	8 Mar 2005 23:45:15 -0000
@@ -1462,7 +1462,6 @@
     ActiveInterpTrace active;
     int curLevel;
     int traceCode = TCL_OK;
-    TraceCommandInfo* tcmdPtr;
     Tcl_InterpState state = NULL;
     
     if (command == NULL || iPtr->tracePtr == NULL ||
@@ -1516,16 +1515,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 */
