[Libreoffice-commits] core.git: Branch 'libreoffice-6-3-3' - sw/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Mon Oct 21 11:28:45 UTC 2019
sw/source/core/doc/DocumentFieldsManager.cxx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit 53e0240109b22db485b4b1212cf63cc8fa4de2be
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Fri Oct 18 23:56:52 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Oct 21 13:27:56 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.grandin at collabora.co.uk>
(cherry picked from commit 9b1f906ea2aa946e9d6245baacd4937233bb58c6)
Reviewed-on: https://gerrit.libreoffice.org/81220
Reviewed-by: Xisco FaulĂ <xiscofauli at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Noel Grandin <noel.grandin at 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();
}
More information about the Libreoffice-commits
mailing list