diff options
author | sebres <sebres@users.sourceforge.net> | 2012-02-17 15:14:16 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2012-02-17 15:14:16 (GMT) |
commit | 553c83462dafd445606dc41eba0ac30e193bc18c (patch) | |
tree | b463adefb1685caa1ec17e385435e5f4ef7d384e /generic/tclCompile.c | |
parent | ee1a343bc1abcc96fe3fe99c22374f4225b1707d (diff) | |
download | tcl-553c83462dafd445606dc41eba0ac30e193bc18c.zip tcl-553c83462dafd445606dc41eba0ac30e193bc18c.tar.gz tcl-553c83462dafd445606dc41eba0ac30e193bc18c.tar.bz2 |
bug fix: avoid segfaulting by deleted interp in RecordByteCodeStats
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r-- | generic/tclCompile.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 6d64feb..59d1fbf 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -4091,12 +4091,11 @@ RecordByteCodeStats( * to add to accumulated statistics. */ { Interp *iPtr = (Interp *) *codePtr->interpHandle; - register ByteCodeStats *statsPtr = &(iPtr->stats); - if (iPtr == NULL) { /* Avoid segfaulting in case we're called in a deleted interp */ return; } + register ByteCodeStats *statsPtr = &(iPtr->stats); statsPtr->numCompilations++; statsPtr->totalSrcBytes += (double) codePtr->numSrcBytes; |