wxFrame: OnSize() has a SEGV if wxFrame has no child. Fixed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux
1998-07-18 10:44:31 +00:00
parent 0d73e5a104
commit cf5f9c9c3e
2 changed files with 8 additions and 0 deletions

View File

@@ -258,6 +258,10 @@ void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
if ( GetAutoLayout() )
Layout();
else {
// no child: go out !
if (!GetChildren()->First())
return;
// do we have exactly one child?
wxWindow *child = NULL;
for(wxNode *node = GetChildren()->First(); node; node = node->Next())

View File

@@ -258,6 +258,10 @@ void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
if ( GetAutoLayout() )
Layout();
else {
// no child: go out !
if (!GetChildren()->First())
return;
// do we have exactly one child?
wxWindow *child = NULL;
for(wxNode *node = GetChildren()->First(); node; node = node->Next())