DatePickerCtrl editor could crash if property had unspecified or otherwise incompatible value
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d932a670ee
commit
5b4666dfbe
@ -315,9 +315,16 @@ wxPGWindowList wxPGDatePickerCtrlEditor::CreateControls( wxPropertyGrid* propgri
|
||||
#else
|
||||
wxSize useSz = sz;
|
||||
#endif
|
||||
|
||||
wxDateTime dateValue(wxInvalidDateTime);
|
||||
|
||||
wxVariant value = prop->GetValue();
|
||||
if ( value.GetType() == wxT("datetime") )
|
||||
dateValue = value.GetDateTime();
|
||||
|
||||
ctrl->Create(propgrid->GetPanel(),
|
||||
wxPG_SUBID1,
|
||||
prop->GetDateValue(),
|
||||
dateValue,
|
||||
pos,
|
||||
useSz,
|
||||
prop->GetDatePickerStyle() | wxNO_BORDER);
|
||||
|
Loading…
Reference in New Issue
Block a user