From: Václav Slavík Date: Tue, 12 Feb 2002 10:37:55 +0000 (+0000) Subject: safeguards against crashes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e41dcea547771f0ba97604565731804e5061bf18 safeguards against crashes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index 5c1cab3bf1..915341e1a4 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -875,12 +875,16 @@ void wxWindowMGL::DragAcceptFiles(bool accept) // Get total size void wxWindowMGL::DoGetSize(int *x, int *y) const { + wxASSERT_MSG( m_wnd, wxT("invalid window") ) + if (x) *x = m_wnd->width; if (y) *y = m_wnd->height; } void wxWindowMGL::DoGetPosition(int *x, int *y) const { + wxASSERT_MSG( m_wnd, wxT("invalid window") ) + if (x) *x = m_wnd->x; if (y) *y = m_wnd->y; }