X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/899544330f37440c140b72a014c518a911b5b7a4..f34105c6159bec8e1359a662bedecdc78c7a11d2:/src/mac/carbon/dirdlg.cpp diff --git a/src/mac/carbon/dirdlg.cpp b/src/mac/carbon/dirdlg.cpp index f63080f4e1..3b596c9f51 100644 --- a/src/mac/carbon/dirdlg.cpp +++ b/src/mac/carbon/dirdlg.cpp @@ -77,13 +77,14 @@ wxDirDialog::wxDirDialog(wxWindow *parent, int wxDirDialog::ShowModal() { - NavDialogRef dialog; + NavDialogRef dialog = NULL; NavDialogCreationOptions options; NavReplyRecord reply ; bool disposeReply = false ; OSStatus err = noErr; err = NavGetDefaultDialogCreationOptions(&options); + options.optionFlags &= ~kNavAllowMultipleFiles; if (err == noErr) { wxMacCFStringHolder message(m_message, m_font.GetEncoding()); @@ -135,6 +136,9 @@ int wxDirDialog::ShowModal() if ( err != noErr && err != userCanceledErr ) m_path = wxEmptyString ; + if ( dialog ) + ::NavDialogDispose(dialog); + return (err == noErr) ? wxID_OK : wxID_CANCEL ; }