Handle the fact that, in OSX 10.15 (Catalina) some osx controls newly respond to the contentView selector and return nil. (#1487)

This has the effect of suppressing wxEVT_PAINT events, because the rectangle in which to draw/paint is calculated incorrectly.
This commit is contained in:
Brian Clark 2019-08-20 08:03:13 -04:00 committed by Stefan Csomor
parent 6096bff66b
commit ee0cffe9bf

View File

@ -3026,7 +3026,7 @@ void wxWidgetCocoaImpl::GetSize( int &width, int &height ) const
void wxWidgetCocoaImpl::GetContentArea( int&left, int &top, int &width, int &height ) const
{
if ( [m_osxView respondsToSelector:@selector(contentView) ] )
if ( [m_osxView respondsToSelector:@selector(contentView) ] && [m_osxView contentView] )
{
NSView* cv = [m_osxView contentView];