diff options
-rw-r--r-- | sw/source/core/doc/DocumentFieldsManager.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
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(); } |