diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-02-25 10:13:54 +0000 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2020-02-26 11:19:11 +0100 |
commit | 911ebc8425082ec699ef03fbab2d77ee67e0fe31 (patch) | |
tree | 7d25663f3610a2c727486cd68a8280a3fd8695a7 /dbaccess | |
parent | b767f6d92e8c055d0313a31bce1caec3ccaddeb0 (diff) |
Resolves: tdf#130922 don't crash removing non-existing elements
Change-Id: Id05faf6537ae096d563c57dcde71cd65ae04152d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89431
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/misc/WColumnSelect.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx index 077e01049767..0e57a26828b2 100644 --- a/dbaccess/source/ui/misc/WColumnSelect.cxx +++ b/dbaccess/source/ui/misc/WColumnSelect.cxx @@ -130,7 +130,9 @@ void OWizColumnSelect::Activate( ) { OUString sId(OUString::number(reinterpret_cast<sal_Int64>(new OFieldDescription(*(column->second))))); m_xNewColumnNames->append(sId, column->first); - m_xOrgColumnNames->remove_text(column->first); + int nRemove = m_xOrgColumnNames->find_text(column->first); + if (nRemove != -1) + m_xOrgColumnNames->remove(nRemove); } } m_pParent->GetOKButton().set_sensitive(m_xNewColumnNames->n_children() != 0); |