diff options
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXDialog.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index 9970bc1..ca55c60 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -725,6 +725,7 @@ Tk_GetSaveFileObjCmd( } } if (fl.filters || defaultType) { + saveFileTypes = [NSMutableArray array]; for (FileFilter *filterPtr = fl.filters; filterPtr; filterPtr = filterPtr->next) { for (FileFilterClause *clausePtr = filterPtr->clauses; clausePtr; @@ -733,8 +734,8 @@ Tk_GetSaveFileObjCmd( globPtr = globPtr->next) { str = globPtr->pattern; while (*str && (*str == '*' || *str == '.')) { - str++; - } + str++; + } if (*str) { type = [[NSString alloc] initWithUTF8String:str]; if (![saveFileTypes containsObject:type]) { |