Fixed #14417: wxRichTextCtrl crashes on LoadFile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2663,6 +2663,8 @@ bool wxRichTextCtrl::RecreateBuffer(const wxSize& size)
|
|||||||
|
|
||||||
bool wxRichTextCtrl::DoLoadFile(const wxString& filename, int fileType)
|
bool wxRichTextCtrl::DoLoadFile(const wxString& filename, int fileType)
|
||||||
{
|
{
|
||||||
|
SetFocusObject(& GetBuffer(), true);
|
||||||
|
|
||||||
bool success = GetBuffer().LoadFile(filename, (wxRichTextFileType)fileType);
|
bool success = GetBuffer().LoadFile(filename, (wxRichTextFileType)fileType);
|
||||||
if (success)
|
if (success)
|
||||||
m_filename = filename;
|
m_filename = filename;
|
||||||
|
Reference in New Issue
Block a user