diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 9587ffa3a7..aa3e705ea1 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -886,7 +886,10 @@ void wxWindowMac::Refresh(bool eraseBack, const wxRect *rect) if ( MacGetTopLevelWindow() == NULL ) return ; - wxPoint client = GetClientAreaOrigin(); + if ( !MacIsReallyShown() ) + return ; + + wxPoint client = GetClientAreaOrigin(); int x1 = -client.x; int y1 = -client.y; int x2 = m_width - client.x; diff --git a/src/mac/window.cpp b/src/mac/window.cpp index 9587ffa3a7..aa3e705ea1 100644 --- a/src/mac/window.cpp +++ b/src/mac/window.cpp @@ -886,7 +886,10 @@ void wxWindowMac::Refresh(bool eraseBack, const wxRect *rect) if ( MacGetTopLevelWindow() == NULL ) return ; - wxPoint client = GetClientAreaOrigin(); + if ( !MacIsReallyShown() ) + return ; + + wxPoint client = GetClientAreaOrigin(); int x1 = -client.x; int y1 = -client.y; int x2 = m_width - client.x;