diff options
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXDialog.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index 9b1c22d..e592e3c 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.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: tkMacOSXDialog.c,v 1.40 2008/12/07 16:32:44 das Exp $ + * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.41 2008/12/07 16:34:12 das Exp $ */ #include "tkMacOSXPrivate.h" @@ -315,7 +315,7 @@ Tk_GetOpenFileObjCmd( } break; case OPEN_INITFILE: - initialFile = Tcl_GetString(objv[i + 1]); + initialFile = Tcl_GetStringFromObj(objv[i + 1], &choiceLen); /* empty strings should be like no selection given */ if (choiceLen == 0) { initialFile = NULL; @@ -376,7 +376,8 @@ Tk_GetOpenFileObjCmd( while (filterPtr && i-- > 0) { filterPtr = filterPtr->next; } - Tcl_SetVar(interp, Tcl_GetString(typeVariablePtr), filterPtr->name, 0); + Tcl_SetVar(interp, Tcl_GetString(typeVariablePtr), filterPtr ? + filterPtr->name : "", 0); } end: |