cui/source/dialogs/cuigaldlg.cxx                 |    5 +++++
 extensions/source/dbpilots/groupboxwiz.cxx       |    2 +-
 sw/source/ui/dbui/customizeaddresslistdialog.cxx |    1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit b6a2f5cd35750f6ed87ab09fb4a64cdf23001936
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sun Dec 21 20:13:05 2025 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Mon Dec 22 10:17:14 2025 +0100

    cid#1676283 Argument cannot be negative
    
    Change-Id: If1bc84a5cdd4d9fa7053feaec4e5306d2700e680
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196052
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx 
b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index 903567e1676e..cd1a2acc2893 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -121,6 +121,7 @@ IMPL_LINK_NOARG(SwCustomizeAddressListDialog, 
DeleteHdl_Impl, weld::Button&, voi
 IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, weld::Button&, 
rButton, void)
 {
     auto nPos = m_xFieldsLB->get_selected_index();
+    assert(nPos && "nothing selected");
     auto nOldPos = nPos;
     OUString aTemp = m_xFieldsLB->get_text(nPos);
     m_xFieldsLB->remove(nPos);
commit e661ff989c86338068dd1c5e6bb552c159c83d31
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sun Dec 21 20:10:39 2025 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Mon Dec 22 10:17:06 2025 +0100

    cid#1676291 Argument cannot be negative
    
    Change-Id: I2c0df3be74ad3ce587de87e288c7dea4b945fe71
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196051
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/extensions/source/dbpilots/groupboxwiz.cxx 
b/extensions/source/dbpilots/groupboxwiz.cxx
index 1904099c5343..84a8a14b90ee 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -370,7 +370,7 @@ namespace dbp
         }
 
         m_nLastSelection = m_xOptions->get_selected_index();
-        DBG_ASSERT(o3tl::make_unsigned(m_nLastSelection) < 
m_aUncommittedValues.size(), "OOptionValuesPage::implTraveledOptions: invalid 
new selection index!");
+        assert(o3tl::make_unsigned(m_nLastSelection) < 
m_aUncommittedValues.size() && "OOptionValuesPage::implTraveledOptions: invalid 
new selection index!");
         m_xValue->set_text(m_aUncommittedValues[m_nLastSelection]);
     }
 
commit f2508099ee3a1fb3d2335cd59ecf57efe6c79c77
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sun Dec 21 20:08:07 2025 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Mon Dec 22 10:16:59 2025 +0100

    cid#1676290 Argument cannot be negative
    
    Change-Id: I849b6ad05383f6296d853f3748dab92d2cd41f76
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196050
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 046a7a7257b5..54cd8590826b 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -868,6 +868,11 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickPreviewHdl, 
weld::Toggleable&, vo
 void TPGalleryThemeProperties::DoPreview()
 {
     int nIndex = m_xLbxFound->get_selected_index();
+    if (nIndex == -1)
+    {
+        SAL_WARN("cui.dialogs", "Nothing selected");
+        return;
+    }
     OUString aString(m_xLbxFound->get_text(nIndex));
 
     if (aString == aPreviewString)

Reply via email to