sw/source/core/doc/DocumentFieldsManager.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit 09a3762fe0fc4c4815c842098094082bf1b90de6 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 08:04:44 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 Reviewed-on: https://gerrit.libreoffice.org/81114 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 9d391b47fb83..2d64955bb1f8 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