diff options
| author | apnadkarni <apnmbx-wits@yahoo.com> | 2025-09-23 10:25:04 (GMT) |
|---|---|---|
| committer | apnadkarni <apnmbx-wits@yahoo.com> | 2025-09-23 10:25:04 (GMT) |
| commit | fe630e70816bac05148415d429920697fd4f7cef (patch) | |
| tree | e1e27e0d98114c7e0eac2a53c5bb310552c123ad /unix/tclUnixInit.c | |
| parent | f5e1c0c4101b76d5967bdc349985df90ac467555 (diff) | |
| parent | b74718ee37115ce70b36b70a6fd197b8ff86857c (diff) | |
| download | tcl-fe630e70816bac05148415d429920697fd4f7cef.zip tcl-fe630e70816bac05148415d429920697fd4f7cef.tar.gz tcl-fe630e70816bac05148415d429920697fd4f7cef.tar.bz2 | |
Bug [c9e68eb6ca] - check result of getenv/GetEnvironmentVariable
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; |
