X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/524c47aa3adf2af11a3069fd5da035a604f08f66..12b5f4b4d2d8a07962da7ba3b78c8c1ec2634a67:/src/osx/nonownedwnd_osx.cpp diff --git a/src/osx/nonownedwnd_osx.cpp b/src/osx/nonownedwnd_osx.cpp index 59905b824f..2a6f1cf005 100644 --- a/src/osx/nonownedwnd_osx.cpp +++ b/src/osx/nonownedwnd_osx.cpp @@ -151,7 +151,7 @@ bool wxNonOwnedWindow::Create(wxWindow *parent, wxNonOwnedWindow::~wxNonOwnedWindow() { - m_isBeingDeleted = true; + SendDestroyEvent(); wxRemoveWXWindowAssociation( this ) ; @@ -350,6 +350,9 @@ bool wxNonOwnedWindow::SetBackgroundStyle(wxBackgroundStyle style) void wxNonOwnedWindow::DoMoveWindow(int x, int y, int width, int height) { + if ( m_nowpeer == NULL ) + return; + m_cachedClippedRectValid = false ; m_nowpeer->MoveWindow(x, y, width, height); @@ -358,6 +361,9 @@ void wxNonOwnedWindow::DoMoveWindow(int x, int y, int width, int height) void wxNonOwnedWindow::DoGetPosition( int *x, int *y ) const { + if ( m_nowpeer == NULL ) + return; + int x1,y1 ; m_nowpeer->GetPosition(x1, y1); @@ -369,6 +375,9 @@ void wxNonOwnedWindow::DoGetPosition( int *x, int *y ) const void wxNonOwnedWindow::DoGetSize( int *width, int *height ) const { + if ( m_nowpeer == NULL ) + return; + int w,h; m_nowpeer->GetSize(w, h); @@ -381,6 +390,9 @@ void wxNonOwnedWindow::DoGetSize( int *width, int *height ) const void wxNonOwnedWindow::DoGetClientSize( int *width, int *height ) const { + if ( m_nowpeer == NULL ) + return; + int left, top, w, h; m_nowpeer->GetContentArea(left, top, w, h);