summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2005-08-31 15:12:18 (GMT)
committervincentdarley <vincentdarley>2005-08-31 15:12:18 (GMT)
commit9dffb7863ba4b0e760ce19215def938abecbcfea (patch)
tree807c9aa089e7e4c4b5f9c102046d5b6780d24a19 /win/tclWinFile.c
parent2e73eedbe37a9f715cd90a7428f6d03648491e8a (diff)
downloadtcl-9dffb7863ba4b0e760ce19215def938abecbcfea.zip
tcl-9dffb7863ba4b0e760ce19215def938abecbcfea.tar.gz
tcl-9dffb7863ba4b0e760ce19215def938abecbcfea.tar.bz2
allow NULL interp in Tcl_FSMatchInDirectory
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c12
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;
}