Remove selection before container is deleted or it could cause a crash later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2015-01-21 14:31:28 +00:00
parent 8af006cfd8
commit 4a5ae79a36

View File

@@ -11798,10 +11798,10 @@ bool wxRichTextAction::Do()
while (c)
{
if (c == container)
{
m_ctrl->StoreFocusObject(container);
break;
}
if (m_ctrl && (c == m_ctrl->GetSelection().GetContainer()))
m_ctrl->SelectNone();
c = c->GetParent();
}
}
@@ -11979,10 +11979,10 @@ bool wxRichTextAction::Undo()
while (c)
{
if (c == container)
{
m_ctrl->StoreFocusObject(container);
break;
}
if (m_ctrl && (c == m_ctrl->GetSelection().GetContainer()))
m_ctrl->SelectNone();
c = c->GetParent();
}
}