sfx2/source/dialog/tabdlg.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit eaa970c9b9d4d8e9e29e419791f7d0dceb7c4d8c
Author:     Heiko Tietze <[email protected]>
AuthorDate: Wed Jun 18 11:26:24 2025 +0200
Commit:     Heiko Tietze <[email protected]>
CommitDate: Wed Jun 18 14:33:43 2025 +0200

    Resolves tdf#167066, relates tdf#165487 - Show first tab as fallback
    
    If the dialog runs for the first time, the viewoptions
    are empty and no tab would be active, crashing on Reset
    
    Change-Id: Ib889c17c5ef5876aa9e6e258d999f7e566aff514
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186656
    Reviewed-by: Heiko Tietze <[email protected]>
    Tested-by: Jenkins

diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 5e75ad64bc57..9320146c9fe6 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -1017,6 +1017,8 @@ void SfxTabDialogController::Start_Impl()
         SvtViewOptions aDlgOpt(EViewType::TabDialog, m_xDialog->get_help_id());
         if (aDlgOpt.Exists())
             m_xTabCtrl->set_current_page(aDlgOpt.GetPageID());
+        else
+            m_xTabCtrl->set_current_page(0);
     }
 
     ActivatePage(m_xTabCtrl->get_current_page_ident());

Reply via email to