sc/source/ui/app/client.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 4a501a7270a0dd476ff71f72fae2c9fb9b40520a
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Mon Sep 4 11:19:31 2023 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Mon Sep 4 14:21:05 2023 +0200

    Related tdf#108976: Crash in: OutputDevice::GetOutputSizePixel()
    
    On pc Debian x86-64 with master sources updated today, I encountered this:
    5  0x00007f68124533a2 in __assert_fail
        (assertion=0x7f67016aea9b "_pInterface != NULL", file=0x7f670156834a 
"/home/julien/lo/libreoffice/include/com/sun/star/uno/Reference.h", line=385, 
function=0x7f6701592970 "interface_type 
*com::sun::star::uno::Reference<com::sun::star::embed::XEmbeddedObject>::operator->()
 const [interface_type = com::sun::star::embed::XEmbeddedObject]") at 
./assert/assert.c:101
    6  0x00007f67023ed042 in 
com::sun::star::uno::Reference<com::sun::star::embed::XEmbeddedObject>::operator->()
 const (this=0x7ffe3b5f11c0) at include/com/sun/star/uno/Reference.h:385
    7  0x00007f67030a7ba9 in ScClient::ViewChanged() (this=0x55fb3b69e7b0) at 
/home/julien/lo/libreoffice/sc/source/ui/app/client.cxx:191
    8  0x00007f680f1d13db in SfxInPlaceClient::Invalidate() 
(this=0x55fb3b69e7b0) at 
/home/julien/lo/libreoffice/sfx2/source/view/ipclient.cxx:840
    9  0x00007f680f1d59db in SfxInPlaceClient::SetObjArea(tools::Rectangle 
const&) (this=0x55fb3b69e7b0, rArea=...) at 
/home/julien/lo/libreoffice/sfx2/source/view/ipclient.cxx:764
    10 0x00007f6703b74c30 in ScTabViewShell::ConnectObject(SdrOle2Obj const*) 
(this=0x55fb3ca0b880, pObj=0x55fb3c68b2c0) at 
/home/julien/lo/libreoffice/sc/source/ui/view/tabvwshb.cxx:107
    
    See full bt here:
    https://bugs.documentfoundation.org/attachment.cgi?id=189332
    
    Change-Id: I0b48f2e624b249438d8d4fbc53057f89f5877c05
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156509
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
    Tested-by: Jenkins

diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index 26c84e5fa347..5c44bc077e83 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -184,6 +184,8 @@ void ScClient::ViewChanged()
     }
 
     uno::Reference < embed::XEmbeddedObject > xObj = GetObject();
+    if (!xObj.is())
+        return;
 
     // TODO/LEAN: working with Visual Area can switch object to running state
     awt::Size aSz;

Reply via email to