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

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2015-01-21 14:31:04 +00:00
parent 30ebabc9d0
commit f4ac4fcab6

View File

@@ -11492,10 +11492,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();
}
}
@@ -11672,10 +11672,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();
}
}