From 809d69287e6ad98e9f6d4e0c7bcde64e2bc74c6f Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 26 Jan 2011 15:52:41 +0000 Subject: [PATCH] avoid populating the array with NULL controls during creation (SetWindowVariant calling SetFont crashing) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datectlg.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index 2ebe9c7c4b..3e6d041eb5 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -381,8 +381,10 @@ wxSize wxDatePickerCtrlGeneric::DoGetBestSize() const wxWindowList wxDatePickerCtrlGeneric::GetCompositeWindowParts() const { wxWindowList parts; - parts.push_back(m_combo); - parts.push_back(m_popup); + if (m_combo) + parts.push_back(m_combo); + if (m_popup) + parts.push_back(m_popup); return parts; } -- 2.50.0