]> git.saurik.com Git - wxWidgets.git/commitdiff
safeguards against crashes
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 12 Feb 2002 10:37:55 +0000 (10:37 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 12 Feb 2002 10:37:55 +0000 (10:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mgl/window.cpp

index 5c1cab3bf154f9afa2c3495d9aac7ffe85727a95..915341e1a4b0dfb32a1e98f0a6ad1dbb462dc29d 100644 (file)
@@ -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;
 }