diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-05-16 22:01:45 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-05-17 09:21:04 +0200 |
commit | 3c0003c9f0ff5bdc49da046a604a3d2c8cc5d5df (patch) | |
tree | 127a218487c37164beb2eb6b3f3c9ecfa926bddf /dbaccess | |
parent | 218d2ab43ac2f1c238349a9e45d5c228ad1c62c4 (diff) |
tdf#125325: fix crash about index managements for dBase
See bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=151468
Pb is aSearch becomes invalid after _rList.erase(aSearch); line 101
so just test aReturn.GetIndexFileName() isn't empty
Change-Id: Iae5b3a7f76fe565f890bd23bfb2ce5d9c6134986
Reviewed-on: https://gerrit.libreoffice.org/72427
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/dbfindex.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 734af6e961bc..fe934b7914c0 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -107,8 +107,7 @@ OTableIndex ODbaseIndexDialog::implRemoveIndex(const OUString& _rName, TableInde else _rDisplay.select(static_cast<sal_uInt16>(nPos)); } - - OSL_ENSURE(!_bMustExist || (aSearch != _rList.end()), "ODbaseIndexDialog::implRemoveIndex : did not find the index!"); + OSL_ENSURE(!_bMustExist || !aReturn.GetIndexFileName().isEmpty(), "ODbaseIndexDialog::implRemoveIndex : did not find the index!"); return aReturn; } |