diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinFile.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index dc6d5a0..aeae4bc 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.76 2005/07/24 22:56:47 dkf Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.77 2005/08/31 15:12:18 vincentdarley Exp $ */ //#define _WIN32_WINNT 0x0500 @@ -1018,10 +1018,12 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types) } TclWinConvertError(err); - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "couldn't read directory \"", - Tcl_DStringValue(&dsOrig), "\": ", - Tcl_PosixError(interp), (char *) NULL); + if (interp != NULL) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "couldn't read directory \"", + Tcl_DStringValue(&dsOrig), "\": ", + Tcl_PosixError(interp), (char *) NULL); + } Tcl_DStringFree(&dsOrig); return TCL_ERROR; } |