summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xwin/tclWinFile.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index a5b14b4..5ee73d5 100755
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -2911,19 +2911,15 @@ TclNativeCreateNativeRep(
*/
validPathPtr = Tcl_FSGetTranslatedPath(NULL, pathPtr);
- if (validPathPtr == NULL) {
- return NULL;
- }
} else {
/*
* Make sure the normalized path is set.
*/
validPathPtr = Tcl_FSGetNormalizedPath(NULL, pathPtr);
- if (validPathPtr == NULL) {
- return NULL;
- }
- Tcl_IncrRefCount(validPathPtr);
+ }
+ if (validPathPtr == NULL) {
+ return NULL;
}
str = Tcl_GetString(validPathPtr);