]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed uninitialized variable (depending on wxChoice ctor used it resulted in an out...
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Tue, 13 Sep 2005 12:54:59 +0000 (12:54 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Tue, 13 Sep 2005 12:54:59 +0000 (12:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/choice.h
src/msw/choice.cpp

index 4661025fe9a5a16772e5215b72b65aab7f1e9bbd..d0cce839b2fa4cafc5452dc3ac67953b13a245da 100644 (file)
@@ -36,7 +36,6 @@ public:
              const wxValidator& validator = wxDefaultValidator,
              const wxString& name = wxChoiceNameStr)
     {
-        Init();
         Create(parent, id, pos, size, n, choices, style, validator, name);
     }
 
@@ -49,7 +48,6 @@ public:
              const wxValidator& validator = wxDefaultValidator,
              const wxString& name = wxChoiceNameStr)
     {
-        Init();
         Create(parent, id, pos, size, choices, style, validator, name);
     }
 
index 31b0b5f46c56bf4f5acbbfac0275c5925304b85f..bd7944b8ea67cc12b45bcd2e0852e2d71f15751c 100644 (file)
@@ -136,6 +136,8 @@ bool wxChoice::CreateAndInit(wxWindow *parent,
                              const wxValidator& validator,
                              const wxString& name)
 {
+    Init();
+
     // initialize wxControl
     if ( !CreateControl(parent, id, pos, size, style, validator, name) )
         return false;