]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/choice.cpp
wxWindow::Fit() infinite loop bug fixed
[wxWidgets.git] / src / msw / choice.cpp
index a901873db3f5b16cf13d1e541ccc5bbbfb50fa74..cf0aec140ebdc5638817d3bee0f0fe7d7d188542 100644 (file)
@@ -38,12 +38,13 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
     wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId);
     event.SetInt(GetSelection());
     event.SetEventObject(this);
-    event.SetString(copystring(GetStringSelection()));
+    event.SetString(GetStringSelection());
     ProcessCommand(event);
-    delete[] event.GetString();
+
     return TRUE;
   }
-  else return FALSE;
+  else
+      return FALSE;
 }
 
 bool wxChoice::Create(wxWindow *parent, wxWindowID id,
@@ -312,7 +313,7 @@ long wxChoice::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
        // with x = 65535 and y = 65535.
        // Filter out this nonsense.
        if (x == 65535 && y == 65535)
-         return Default();
+         return 0;
        break;
       }
     }