fixed uninitialized variable (depending on wxChoice ctor used it resulted in an out of bounds wxChoice::GetSelection() return value)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2005-09-13 12:54:59 +00:00
parent 95e33ad869
commit 451f6363c9
2 changed files with 2 additions and 2 deletions

View File

@@ -36,7 +36,6 @@ public:
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr) const wxString& name = wxChoiceNameStr)
{ {
Init();
Create(parent, id, pos, size, n, choices, style, validator, name); Create(parent, id, pos, size, n, choices, style, validator, name);
} }
@@ -49,7 +48,6 @@ public:
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr) const wxString& name = wxChoiceNameStr)
{ {
Init();
Create(parent, id, pos, size, choices, style, validator, name); Create(parent, id, pos, size, choices, style, validator, name);
} }

View File

@@ -136,6 +136,8 @@ bool wxChoice::CreateAndInit(wxWindow *parent,
const wxValidator& validator, const wxValidator& validator,
const wxString& name) const wxString& name)
{ {
Init();
// initialize wxControl // initialize wxControl
if ( !CreateControl(parent, id, pos, size, style, validator, name) ) if ( !CreateControl(parent, id, pos, size, style, validator, name) )
return false; return false;