diff options
-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); } |