X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/318955603b356aab601e19d26fa5b5e90ab22d6a..d485bda109d5ef0fef36a3f737549e9b9f54baab:/src/osx/cocoa/filedlg.mm diff --git a/src/osx/cocoa/filedlg.mm b/src/osx/cocoa/filedlg.mm index 40fd8c4294..b159a1844b 100644 --- a/src/osx/cocoa/filedlg.mm +++ b/src/osx/cocoa/filedlg.mm @@ -448,6 +448,11 @@ bool wxFileDialog::CheckFile( const wxString& filename ) void wxFileDialog::SetupExtraControls(WXWindow nativeWindow) { NSSavePanel* panel = (NSSavePanel*) nativeWindow; + // for sandboxed app we cannot access the outer structures + // this leads to problems with extra controls, so as a temporary + // workaround for crashes we don't support those yet + if ( [panel contentView] == nil ) + return; wxNonOwnedWindow::Create( GetParent(), nativeWindow ); wxWindow* extracontrol = NULL; @@ -693,7 +698,9 @@ void wxFileDialog::ModalFinishedCallback(void* panel, int returnCode) if (GetModality() == wxDIALOG_MODALITY_WINDOW_MODAL) SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); - UnsubclassWin(); + // workaround for sandboxed app, see above + if ( m_isNativeWindowWrapper ) + UnsubclassWin(); [(NSSavePanel*) panel setAccessoryView:nil]; }