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 /generic/tclMain.c | |
| 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.
Diffstat (limited to 'generic/tclMain.c')
| -rw-r--r-- | generic/tclMain.c | 9 | 
1 files changed, 7 insertions, 2 deletions
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);  }  | 
