[Libreoffice-commits] core.git: dbaccess/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Feb 25 12:31:56 UTC 2020


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

New commits:
commit fe5366d9d2d57ee3648589db86d2c17f43febb6b
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Feb 25 10:13:54 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Feb 25 13:31:20 2020 +0100

    Resolves: tdf#130922 don't crash removing non-existing elements
    
    Change-Id: Id05faf6537ae096d563c57dcde71cd65ae04152d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89418
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

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