void wxRemoveMacControlAssociation(wxControl *control)
{
- wxWinMacControlList->DeleteObject(control);
+ if ( wxWinMacControlList )
+ wxWinMacControlList->DeleteObject(control);
}
void wxControl::MacPreControlCreate( wxWindow *parent, wxWindowID id, wxString label ,
ControlHandle container = (ControlHandle) GetParent()->MacGetContainerForEmbedding() ;
wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ;
::EmbedControl( (ControlHandle) m_macControl , container ) ;
- m_macControlIsShown = true ;
+ m_macControlIsShown = MacIsReallyShown() ;
wxAssociateControlWithMacControl( (ControlHandle) m_macControl , this ) ;
if ( wxMacSetupControlBackgroundUPP == NULL )
UMASetControlTitle( (ControlHandle) m_macControl , wxStripMenuCodes(m_label) ) ;
#endif
- UMAShowControl( (ControlHandle) m_macControl ) ;
+ if ( m_macControlIsShown )
+ UMAShowControl( (ControlHandle) m_macControl ) ;
SetCursor( *wxSTANDARD_CURSOR ) ;