diff options
| author | apnadkarni <apnmbx-wits@yahoo.com> | 2025-09-22 10:09:29 (GMT) |
|---|---|---|
| committer | apnadkarni <apnmbx-wits@yahoo.com> | 2025-09-22 10:09:29 (GMT) |
| commit | a847875480c40480b57e2c692a0cf929aba18b03 (patch) | |
| tree | faeda7aa4e35d38e4771ffbc47c835292508b9d0 /unix/tclUnixInit.c | |
| parent | f5e1c0c4101b76d5967bdc349985df90ac467555 (diff) | |
| download | tcl-a847875480c40480b57e2c692a0cf929aba18b03.zip tcl-a847875480c40480b57e2c692a0cf929aba18b03.tar.gz tcl-a847875480c40480b57e2c692a0cf929aba18b03.tar.bz2 | |
Bug [c9e68eb6ca] - check getenv result for TCL_LIBRARY
Diffstat (limited to 'unix/tclUnixInit.c')
| -rw-r--r-- | unix/tclUnixInit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index c7de6a8..8c16d74 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -479,8 +479,10 @@ TclpInitLibraryPath( */ str = getenv("TCL_LIBRARY"); /* INTL: Native. */ - Tcl_ExternalToUtfDString(NULL, str, -1, &buffer); - str = Tcl_DStringValue(&buffer); + if (str != NULL) { + Tcl_ExternalToUtfDString(NULL, str, -1, &buffer); + str = Tcl_DStringValue(&buffer); + } if ((str != NULL) && (str[0] != '\0')) { Tcl_DString ds; |
