]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/aui/auidemo.cpp
corrected crash: need to set m_frame eariler (Wlodek Szafran, closes bug 1636225)
[wxWidgets.git] / samples / aui / auidemo.cpp
index 8eb56840b70efffb89a7bf4c512c71b5d1383b94..cfd0c27efce9d0a58a2750f55d9400c953eb8781 100644 (file)
@@ -269,7 +269,8 @@ class SettingsPanel : public wxPanel
 public:
 
     SettingsPanel(wxWindow* parent, MyFrame* frame)
-            : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize)
+            : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize),
+              m_frame(frame)
     {
         //wxBoxSizer* vert = new wxBoxSizer(wxVERTICAL);
 
@@ -402,7 +403,6 @@ public:
         SetSizer(cont_sizer);
         GetSizer()->SetSizeHints(this);
 
-        m_frame = frame;
         m_border_size->SetValue(frame->GetDockArt()->GetMetric(wxAUI_DOCKART_PANE_BORDER_SIZE));
         m_sash_size->SetValue(frame->GetDockArt()->GetMetric(wxAUI_DOCKART_SASH_SIZE));
         m_caption_size->SetValue(frame->GetDockArt()->GetMetric(wxAUI_DOCKART_CAPTION_SIZE));