sc/source/ui/app/transobj.cxx    |    2 +-
 sc/source/ui/attrdlg/attrdlg.cxx |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 67fe262b0a01ed205e1006372cbff05389e7d65d
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Aug 25 12:39:37 2023 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Sep 6 15:18:05 2023 +0200

    sc: fix crash in ScAttrDlg::PageCreated
    
    See 
https://crashreport.libreoffice.org/stats/signature/ScAttrDlg::PageCreated(rtl::OString%20const%20&,SfxTabPage%20&)
    
    Change-Id: I3f89cc917648462f819eb35461055096a6eb3853
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156093
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    (cherry picked from commit c46f00166027fa3eefc75f9cb13bf4afc887bf1d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156003
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit 24d63b2b76c72dbd9b223cdc5ac0324acb013807)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156382
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
    Reviewed-by: Hossein <hoss...@libreoffice.org>
    Tested-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx
index 7a80073d9da3..e09a69b5c13f 100644
--- a/sc/source/ui/attrdlg/attrdlg.cxx
+++ b/sc/source/ui/attrdlg/attrdlg.cxx
@@ -90,8 +90,11 @@ void ScAttrDlg::PageCreated(const OUString& rPageId, 
SfxTabPage& rTabPage)
     {
         const SfxPoolItem* pInfoItem = pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST 
);
         assert(pInfoItem && "FontListItem  not found :-(");
-        aSet.Put (SvxFontListItem(static_cast<const 
SvxFontListItem*>(pInfoItem)->GetFontList(), SID_ATTR_CHAR_FONTLIST ));
-        rTabPage.PageCreated(aSet);
+        if (pInfoItem)
+        {
+            aSet.Put (SvxFontListItem(static_cast<const 
SvxFontListItem*>(pInfoItem)->GetFontList(), SID_ATTR_CHAR_FONTLIST ));
+            rTabPage.PageCreated(aSet);
+        }
     }
     else if (rPageId == "background")
     {
commit 971e13a62cf16b5a02d4b2eda0430fb1f28051fc
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Aug 25 12:42:02 2023 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Sep 6 15:17:55 2023 +0200

    sc: fix crash in ScTransferObj::DragFinished
    
    See 
https://crashreport.libreoffice.org/stats/signature/ScModule::GetDragData()
    
    Change-Id: Ic5cdc3e1796fa20ac84150a04bed539bc9ca7321
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156094
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    (cherry picked from commit 8b022db4cd397fd88f8078fc7f5ff85f21635155)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156005
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit 25d0a72373d7401b5a85aa7ef0a602bb9c975cb0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156381
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
    Reviewed-by: Hossein <hoss...@libreoffice.org>
    Tested-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index f19bf94a4ff1..6a1ef6a04650 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -566,7 +566,7 @@ void ScTransferObj::DragFinished( sal_Int8 nDropAction )
     }
 
     ScModule* pScMod = SC_MOD();
-    if ( pScMod->GetDragData().pCellTransfer == this )
+    if ( pScMod && pScMod->GetDragData().pCellTransfer == this )
         pScMod->ResetDragObject();
 
     m_xDragSourceRanges = nullptr;       // don't keep source after dropping

Reply via email to