sw/source/uibase/docvw/PostItMgr.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit b0bbfdf89d6496ffda4dc409ec5f2add8c94fe2a Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sun May 24 22:56:28 2020 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon May 25 08:46:00 2020 +0200 tdf#133348 remove from list before calling SetActiveSidebarWin so GetNextPostIt won't deal with mvPostItFields containing empty unique_ptr See bt here: https://bugs.documentfoundation.org/attachment.cgi?id=161242 Change-Id: I7c9a3e91d5186492cb185f799b60d1dcc5edf7af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94766 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 1d68a7c9465f..b67252a139d8 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -306,12 +306,14 @@ void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast ) if (i != mvPostItFields.end()) { std::unique_ptr<SwSidebarItem> p = std::move(*i); - if (GetActiveSidebarWin() == p->pPostIt) - SetActiveSidebarWin(nullptr); // tdf#120487 remove from list before dispose, so comment window // won't be recreated due to the entry still in the list if focus // transferring from the pPostIt triggers relayout of postits + // tdf#133348 remove from list before calling SetActiveSidebarWin + // so GetNextPostIt won't deal with mvPostItFields containing empty unique_ptr mvPostItFields.erase(i); + if (GetActiveSidebarWin() == p->pPostIt) + SetActiveSidebarWin(nullptr); p->pPostIt.disposeAndClear(); } mbLayout = true; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits