Don't get the string when the combobox returned CB_ERR when getting
the length. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -202,7 +202,7 @@ wxString wxChoice::GetString(int n) const
|
||||
{
|
||||
size_t len = (size_t)::SendMessage(GetHwnd(), CB_GETLBTEXTLEN, n, 0);
|
||||
wxString str;
|
||||
if (len) {
|
||||
if (len != CB_ERR && len > 0) {
|
||||
if ( ::SendMessage(GetHwnd(), CB_GETLBTEXT, n,
|
||||
(LPARAM)str.GetWriteBuf(len)) == CB_ERR ) {
|
||||
wxLogLastError(wxT("SendMessage(CB_GETLBTEXT)"));
|
||||
|
Reference in New Issue
Block a user