From e41dcea547771f0ba97604565731804e5061bf18 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 12 Feb 2002 10:37:55 +0000 Subject: [PATCH] safeguards against crashes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mgl/window.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.45.2