diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index f10b5015ca..1b4e84226f 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -202,6 +202,9 @@ bool wxCalendarCtrl::Create(wxWindow *parent, long style, const wxString& name) { + // set the style first to avoid assert in our SetWindowStyleFlag() + m_windowStyle = style; + if ( !wxControl::Create(parent, id, pos, size, style | wxCLIP_CHILDREN | wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE, wxDefaultValidator, name) )