sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |    3 +++
 sw/source/core/layout/tabfrm.cxx                    |    7 ++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 2fe94b4813c32419051044117ab8a133410e8396
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Jul 20 09:01:38 2025 +0200
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Fri Aug 8 11:52:38 2025 +0200

    tdf#167599: check the result of UNO_QUERY
    
    Not all objects implement XServiceInfo. Any query must either be
    UNO_QUERY_THROW, or check its result after UNO_QUERY.
    
    Change-Id: I8b1d7c719c4a43a4d658957ad5a91181dc265186
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188080
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    (cherry picked from commit 125053348935ab307978037abaa459acd509c4c7)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188677
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit fdaba4f87e74fa452b591e6ad43cf627f208c04a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189052
    Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index b037d746f5a5..f09817851886 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -1275,6 +1275,9 @@ void 
ObjectInspectorTreeHandler::appendServices(uno::Reference<uno::XInterface>
         return;
 
     auto xServiceInfo = uno::Reference<lang::XServiceInfo>(xInterface, 
uno::UNO_QUERY);
+    if (!xServiceInfo)
+        return;
+
     const uno::Sequence<OUString> 
aServiceNames(xServiceInfo->getSupportedServiceNames());
     for (auto const& aServiceName : aServiceNames)
     {
commit 5e4a99cdb32b849fd4c845213bbe5caac42f8ef3
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed Jul 30 09:19:57 2025 +0200
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Fri Aug 8 11:52:25 2025 +0200

    sw: fix crash in lcl_InnerCalcLayout()
    
    Crashreport signature:
    
    kit-32444-32444 2025-07-30 00:27:03.547433 +0000 [ kitbroker_7771 ] SIG   
Fatal signal received: SIGSEGV code: 1 for address: 0xa8
    ...
    program/libswlo.so
          lcl_InnerCalcLayout(SwFrame*, long, bool)
                  sw/source/core/inc/rootfrm.hxx:217
    program/libswlo.so
          lcl_RecalcRow(SwRowFrame&, long)
                  sw/source/core/layout/tabfrm.cxx:1923
    program/libswlo.so
          SwTabFrame::MakeAll(OutputDevice*) [clone .localalias]
                  sw/source/core/inc/flowfrm.hxx:170
    program/libswlo.so
          SwFrame::PrepareMake(OutputDevice*)
                  sw/source/core/inc/frmtool.hxx:476
    
    and then gdb reports:
    
            Program terminated with signal SIGSEGV, Segmentation fault.
            #0  0x00007fa134d7e4c4 in SwRootFrame::GetCurrShell 
(this=<optimized out>) at sw/source/core/inc/rootfrm.hxx:217
            217         SwViewShell *GetCurrShell() const { return mpCurrShell; 
}
            (gdb) up
            #1  lcl_InnerCalcLayout(SwFrame*, long, bool) () at 
sw/source/core/layout/tabfrm.cxx:1864
            1864        vcl::RenderContext* pRenderContext = 
pFrame->getRootFrame()->GetCurrShell() ? 
pFrame->getRootFrame()->GetCurrShell()->GetOut() : nullptr;
            (gdb) print pFrame
            $2 = (SwFrame *) 0x0
    
    Change-Id: I78a02ec062ad1c9645dbcb2fe82a5ae732d1f060
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188584
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins
    (cherry picked from commit 548adbdda062ce595b49939a617fcccf2cf212de)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188675
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit f40515eefd466a58d207750f13d713a169c18b23)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189042
    Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 003b528dcbd7..145429b107b3 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1873,10 +1873,15 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame,
                                       tools::Long nBottom,
                                       bool _bOnlyRowsAndCells )
 {
+    bool bRet = false;
+    if (!pFrame)
+    {
+        return bRet;
+    }
+
     vcl::RenderContext* pRenderContext = 
pFrame->getRootFrame()->GetCurrShell() ? 
pFrame->getRootFrame()->GetCurrShell()->GetOut() : nullptr;
     // LONG_MAX == nBottom means we have to calculate all
     bool bAll = LONG_MAX == nBottom;
-    bool bRet = false;
     const SwFrame* pOldUp = pFrame->GetUpper();
     SwRectFnSet aRectFnSet(pFrame);
     do

Reply via email to