diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCompile.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 8aedf95..ae633ea 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -4572,6 +4572,11 @@ RecordByteCodeStats( 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; + } + statsPtr->numCompilations++; statsPtr->totalSrcBytes += (double) codePtr->numSrcBytes; statsPtr->totalByteCodeBytes += (double) codePtr->structureSize; |