sw/source/core/doc/DocumentFieldsManager.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit 9b1f906ea2aa946e9d6245baacd4937233bb58c6 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Fri Oct 18 23:56:52 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Oct 19 14:35:17 2019 +0200 tdf#128232: fix crash when trying to delete unused User Field mpFieldTypes is std::unique_ptr<SwFieldTypes> (see https://opengrok.libreoffice.org/xref/core/sw/source/core/inc/DocumentFieldsManager.hxx?r=99a97d38#104) See bt: https://bugs.documentfoundation.org/attachment.cgi?id=155132 Change-Id: Iea8eddd4b1bdc9ce3c01988fc97004b7ec7a6e5f (cherry picked from commit 09a3762fe0fc4c4815c842098094082bf1b90de6) Reviewed-on: https://gerrit.libreoffice.org/81120 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index c66b4ddd22a1..f54eadaf4c7d 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -374,11 +374,10 @@ void DocumentFieldsManager::RemoveFieldType(size_t nField) if( nWhich != SwFieldIds::Database ) { OSL_ENSURE( !pTmp->HasWriterListeners(), "Dependent fields present!" ); - // delete field type - delete pTmp; } else (*mpFieldTypes)[nField].release(); // DB fields are ref-counted and delete themselves + mpFieldTypes->erase( mpFieldTypes->begin() + nField ); m_rDoc.getIDocumentState().SetModified(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits