diff options
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/generalpage.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 3eea60ae223c..037391641dfd 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -329,6 +329,11 @@ namespace dbaui { // get the type from the entry data sal_Int16 nSelected = _pBox->GetSelectEntryPos(); + if (nSelected < 0 || nSelected >= m_aURLPrefixes.size() ) + { + SAL_WARN("dbaui.OGeneralPage", "Got out-of-range value '" << nSelected << "' from the DatasourceType selection ListBox's GetSelectEntryPos(): " << ((nSelected < 0) ? "negative" : "no corresponding URL prefix") ); + return 0L; + } const OUString sURLPrefix = m_aURLPrefixes[ nSelected ]; setParentTitle( sURLPrefix ); |