dbaccess/source/ui/dlg/generalpage.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 94e5443c05f3ed47d51465b91d5312a7d010b716
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Thu Sep 13 21:13:16 2018 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Fri Sep 14 07:02:39 2018 +0200

    Fix warning out-of-range value from the DatasourceType selection
    
    Fix 
warn:dbaccess.ui.generalpage:19437:19437:dbaccess/source/ui/dlg/generalpage.cxx:405:
    Got out-of-range value '2147483647' from the DatasourceType selection 
ListBox's GetSelectedEntryPos():
    no corresponding URL prefix
    
    Just Launch Base and select "Open an existing database file" and see this 
log
    If there's nothing to display, we get 2147483647 which corresponds to 
LISTBOX_ENTRY_NOTFOUND
    
    Change-Id: Iaab680695d9816c6375d9ef04f02845890f99dda
    Reviewed-on: https://gerrit.libreoffice.org/60464
    Reviewed-by: Lionel Elie Mamane <lio...@mamane.lu>
    Tested-by: Jenkins

diff --git a/dbaccess/source/ui/dlg/generalpage.cxx 
b/dbaccess/source/ui/dlg/generalpage.cxx
index 129583a7f8e3..e3efcaaedaf3 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -400,6 +400,8 @@ namespace dbaui
     {
         // get the type from the entry data
         const sal_Int32 nSelected = _rBox.GetSelectedEntryPos();
+        if ( nSelected == LISTBOX_ENTRY_NOTFOUND)
+            return;
         if (static_cast<size_t>(nSelected) >= m_aURLPrefixes.size() )
         {
             SAL_WARN("dbaccess.ui.generalpage", "Got out-of-range value '" << 
nSelected <<  "' from the DatasourceType selection ListBox's 
GetSelectedEntryPos(): no corresponding URL prefix");
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to