]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/laywin.cpp
Fixed wxFileDialog and VC++ DLL compilation
[wxWidgets.git] / src / generic / laywin.cpp
index 88677b37808a32591cfd34261be017ecb4f43cc4..c7d54c931d0e7736f35e191754a4065fbbf34cb9 100644 (file)
@@ -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;
 }