]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/ctrlcmn.cpp
fixing overrelease and out-of-bounds write, fixes #13725
[wxWidgets.git] / src / common / ctrlcmn.cpp
index 82bcefd81429c2029735b402303bee911c6d6cc6..af5c83292f14b37609e9fdaef016eea5fde85823 100644 (file)
@@ -149,6 +149,12 @@ void wxControlBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
 #endif // wxUSE_RADIOBTN
 }
 
+wxSize wxControlBase::DoGetSizeFromTextSize(int WXUNUSED(xlen),
+                                            int WXUNUSED(ylen)) const
+{
+    return wxSize(-1, -1);
+}
+
 /* static */
 wxString wxControlBase::GetLabelText(const wxString& label)
 {
@@ -588,7 +594,7 @@ wxSize wxStaticBitmapBase::DoGetBestSize() const
 {
     wxSize best;
     wxBitmap bmp = GetBitmap();
-    if ( bmp.Ok() )
+    if ( bmp.IsOk() )
         best = wxSize(bmp.GetWidth(), bmp.GetHeight());
     else
         // this is completely arbitrary