sw/source/ui/frmdlg/frmpage.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 076dd358aafb749c8b9026da91abdcae07c45ca3
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Aug 15 12:43:09 2022 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Wed Aug 17 10:08:36 2022 +0200

    don't try and select position 0 of combobox if combobox is empty
    
    Change-Id: Ie3e128228c3a2d7d17126e743e756d7d3320255c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138285
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 83cf98f49195..11955b5beb42 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -1397,7 +1397,7 @@ sal_Int32 SwFramePage::FillPosLB(const FrameMap* _pMap,
     if (_rLB.get_active() == -1)
         _rLB.set_active_text(sOldEntry);
 
-    if (_rLB.get_active() == -1)
+    if (_rLB.get_active() == -1 && _rLB.get_count())
         _rLB.set_active(0);
 
     PosHdl(_rLB);

Reply via email to