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:
@@ -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())
|
||||
|
@@ -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())
|
||||
|
Reference in New Issue
Block a user