[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - dbaccess/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 7 10:08:29 UTC 2021
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 098c6c216af2828ab388ca61abee594f69bb5793
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Mon Sep 6 21:45:42 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Sep 7 12:07:55 2021 +0200
tdf#140951: fix crash on Base when accessibility used
See bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=174832
Change-Id: Ia0a52b1e6aafc043f6be2d8406a98e7d4ebf55dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121735
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 970883a85ad1d714683a1d98fb45efc89cbdeb3b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121758
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 22e17c01ec36..a466f74c840a 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -2098,6 +2098,8 @@ OUString OSelectionBrowseBox::GetCellText(sal_Int32 nRow, sal_uInt16 nColId) con
{
sal_uInt16 nPos = GetColumnPos(nColId);
+ if ( nPos == 0 || nPos == BROWSER_INVALIDID || nPos > getFields().size() )
+ return OUString();
OTableFieldDescRef pEntry = getFields()[nPos-1];
OSL_ENSURE(pEntry != nullptr, "OSelectionBrowseBox::GetCellText : invalid column id, prepare for GPF ... ");
@@ -2682,7 +2684,7 @@ void OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef const & _pEntry)
Reference< XAccessible > OSelectionBrowseBox::CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos )
{
OTableFieldDescRef pEntry;
- if(getFields().size() > o3tl::make_unsigned(_nColumnPos - 1))
+ if ( _nColumnPos != 0 && _nColumnPos != BROWSER_INVALIDID && _nColumnPos <= getFields().size() )
pEntry = getFields()[_nColumnPos - 1];
if ( _nRow == BROW_VIS_ROW && pEntry.is() )
More information about the Libreoffice-commits
mailing list