sw/source/core/layout/fly.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit f63afb95b5c2d80d33a35820ef1d9abd9e70d3ca Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Mon Oct 26 16:17:04 2020 +0100 Commit: Michael Stahl <michael.st...@cib.de> CommitDate: Mon Oct 26 18:50:19 2020 +0100 tdf#131679 sw: follow-up: Unmark before SetSelection() Backporting this to 6.4, it crashes in CppunitTest_desktop_lib because some sidebar is loaded from SwView::AttrChangedNotify()/SelectShell() and that ends up calling SwView::StateTabWin() about 40 stack frames later and this calls SwFEShell::GetAnyCurRect() which gets the still selected fly but its page frame is null. So make sure shells don't see the deleted fly. Change-Id: I6e994b26949d195aa9f326f4da193c69b0ee59c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104815 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@cib.de> diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 1122809daa05..d44af82f1eac 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -412,6 +412,7 @@ void SwFlyFrame::FinitDrawObj() if (SwFEShell *const pFEShell = dynamic_cast<SwFEShell*>(&rCurrentShell)) { // tdf#131679 move any cursor out of fly SwFlyFrame const*const pOldSelFly = ::GetFlyFromMarked(nullptr, pFEShell); + rCurrentShell.Imp()->GetDrawView()->UnmarkAll(); if (pOldSelFly) { SwPosition const pos(ResolveFlyAnchor(*pOldSelFly->GetFormat())); @@ -421,7 +422,10 @@ void SwFlyFrame::FinitDrawObj() // does, but that would access layout a bit much... } } - rCurrentShell.Imp()->GetDrawView()->UnmarkAll(); + else + { + rCurrentShell.Imp()->GetDrawView()->UnmarkAll(); + } } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits