]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listbox.cpp
Applied patch [ 774837 ] OGL wxLineShape::HitTest: smaller region
[wxWidgets.git] / src / msw / listbox.cpp
index c84ead3a3ba126f42ce9ac9557ea6f8bc0ff338d..247ae933c8c29825ff5bbafcee5bb81810a5c2a9 100644 (file)
@@ -454,8 +454,7 @@ wxString wxListBox::GetString(int N) const
 
     // +1 for terminating NUL
     wxString result;
-    ListBox_GetText(GetHwnd(), N, result.GetWriteBuf(len + 1));
-    result.UngetWriteBuf();
+    ListBox_GetText(GetHwnd(), N, wxStringBuffer(result, len + 1));
 
     return result;
 }