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.stahl@allotropia.de>
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 83cf98f..11955b5 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);