diff options
author | dgp <dgp@users.sourceforge.net> | 2002-01-07 17:54:52 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2002-01-07 17:54:52 (GMT) |
commit | 84fa1e6dcfd96c948d28631c761fae53e8683af4 (patch) | |
tree | 2e167876fd094243795086c05469d97caa99a900 | |
parent | 33ac8d206a0d1b8f7463f7b9780e168dd06898b9 (diff) | |
download | tcl-84fa1e6dcfd96c948d28631c761fae53e8683af4.zip tcl-84fa1e6dcfd96c948d28631c761fae53e8683af4.tar.gz tcl-84fa1e6dcfd96c948d28631c761fae53e8683af4.tar.bz2 |
* generic/tclMain.c: Bug fix: neglected the NULL case in
TclGetStartupScriptFileName(). Broke Tk/wish.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclMain.c | 9 |
2 files changed, 12 insertions, 3 deletions
@@ -1,5 +1,9 @@ -2002-01-05 Don Porter <dgp@users.sourceforge.net> +2002-01-07 Don Porter <dgp@users.sourceforge.net> + + * generic/tclMain.c: Bug fix: neglected the NULL case in + TclGetStartupScriptFileName(). Broke Tk/wish. +2002-01-05 Don Porter <dgp@users.sourceforge.net> * doc/Tcl_Main.3: * generic/tclMain.c: Substantial rewrite and expanded documentation of Tcl_Main to correct a number of bugs and flaws: diff --git a/generic/tclMain.c b/generic/tclMain.c index 0678e3f..05b8278 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMain.c,v 1.15 2002/01/05 22:55:52 dgp Exp $ + * RCS: @(#) $Id: tclMain.c,v 1.16 2002/01/07 17:54:52 dgp Exp $ */ #include "tcl.h" @@ -175,7 +175,12 @@ void TclSetStartupScriptFileName(fileName) */ CONST char *TclGetStartupScriptFileName() { - return Tcl_GetString(TclGetStartupScriptPath()); + Tcl_Obj *pathPtr = TclGetStartupScriptPath(); + + if (pathPtr == NULL) { + return NULL; + } + return Tcl_GetString(pathPtr); } |