[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - dbaccess/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Feb 26 10:19:41 UTC 2020


 dbaccess/source/ui/misc/WColumnSelect.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 911ebc8425082ec699ef03fbab2d77ee67e0fe31
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Feb 25 10:13:54 2020 +0000
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Feb 26 11:19:11 2020 +0100

    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 at libreoffice.org>

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);


More information about the Libreoffice-commits mailing list