X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2243eed57327ce844cfaf61f25b11cf372f96309..574c0bbfbd2096f7ee0d10ad7222bb012e6f5ad7:/src/generic/laywin.cpp diff --git a/src/generic/laywin.cpp b/src/generic/laywin.cpp index 88677b3780..c7d54c931d 100644 --- a/src/generic/laywin.cpp +++ b/src/generic/laywin.cpp @@ -176,7 +176,7 @@ bool wxLayoutAlgorithm::LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* r) wxCalculateLayoutEvent event; event.SetRect(rect); - wxNode* node = frame->GetChildren()->First(); + wxNode* node = frame->GetChildren().First(); while (node) { wxWindow* win = (wxWindow*) node->Data(); @@ -210,7 +210,7 @@ bool wxLayoutAlgorithm::LayoutFrame(wxFrame* frame, wxWindow* mainWindow) wxCalculateLayoutEvent event; event.SetRect(rect); - wxNode* node = frame->GetChildren()->First(); + wxNode* node = frame->GetChildren().First(); while (node) { wxWindow* win = (wxWindow*) node->Data(); @@ -226,7 +226,8 @@ bool wxLayoutAlgorithm::LayoutFrame(wxFrame* frame, wxWindow* mainWindow) rect = event.GetRect(); - mainWindow->SetSize(rect.x, rect.y, rect.width, rect.height); + if (mainWindow) + mainWindow->SetSize(rect.x, rect.y, rect.width, rect.height); return TRUE; }