safeguards against crashes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2002-02-12 10:37:55 +00:00
parent 3dbe38c370
commit e41dcea547

View File

@ -875,12 +875,16 @@ void wxWindowMGL::DragAcceptFiles(bool accept)
// Get total size // Get total size
void wxWindowMGL::DoGetSize(int *x, int *y) const void wxWindowMGL::DoGetSize(int *x, int *y) const
{ {
wxASSERT_MSG( m_wnd, wxT("invalid window") )
if (x) *x = m_wnd->width; if (x) *x = m_wnd->width;
if (y) *y = m_wnd->height; if (y) *y = m_wnd->height;
} }
void wxWindowMGL::DoGetPosition(int *x, int *y) const void wxWindowMGL::DoGetPosition(int *x, int *y) const
{ {
wxASSERT_MSG( m_wnd, wxT("invalid window") )
if (x) *x = m_wnd->x; if (x) *x = m_wnd->x;
if (y) *y = m_wnd->y; if (y) *y = m_wnd->y;
} }