]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextctrl.cpp
don't crash when destroying window with scrollbars
[wxWidgets.git] / src / richtext / richtextctrl.cpp
index 88008daa7f624557b875ad25baa8e64aa9262bfd..636c49443972f05c48317d86accc05b5cd23aee8 100644 (file)
@@ -157,7 +157,7 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va
     SetBackgroundStyle(wxBG_STYLE_CUSTOM);
 
     // Tell the sizers to use the given or best size
-    SetBestFittingSize(size);
+    SetInitialSize(size);
 
 #if wxRICHTEXT_BUFFERED_PAINTING
     // Create a buffer
@@ -426,13 +426,11 @@ void wxRichTextCtrl::OnMoveMouse(wxMouseEvent& event)
             {
                 if (attr.HasFlag(wxTEXT_ATTR_URL))
                 {
-                    if (!GetCursor().IsRefTo(&m_urlCursor))
-                        SetCursor(m_urlCursor);
+                    SetCursor(m_urlCursor);
                 }
                 else if (!attr.HasFlag(wxTEXT_ATTR_URL))
                 {
-                    if (!GetCursor().IsRefTo(&m_textCursor))
-                        SetCursor(m_textCursor);
+                    SetCursor(m_textCursor);
                 }
             }
         }