[Libreoffice-commits] core.git: sd/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 22 16:06:09 UTC 2021


 sd/source/ui/app/sdxfer.cxx |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 90aefc051a8de8c9800f06f44252311f86f99f35
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 22 11:05:20 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Mar 22 17:05:16 2021 +0100

    failure seen in UITest backtrace
    
    Thread 1 (Thread 0x2ba41b2ef700 (LWP 27523)):
     #0  0x00002ba4249a0464 in SdTransferable::ObjectReleased() (this=0x2501da0) at sd/source/ui/app/sdxfer.cxx:650
     #1  0x00002ba4249a00db in SdTransferable::~SdTransferable() (this=0x2501da0) at sd/source/ui/app/sdxfer.cxx:113
             g = {<osl::Guard<comphelper::SolarMutex>> = {pT = 0x14c1ee0}, <No data fields>}
     #2  0x00002ba4249f1d36 in SdPageObjsTLV::SdPageObjsTransferable::~SdPageObjsTransferable() (this=0x2501da0) at sd/source/ui/dlg/sdtreelb.cxx:79
     #3  0x00002ba4249f1d79 in SdPageObjsTLV::SdPageObjsTransferable::~SdPageObjsTransferable() (this=0x2501da0) at sd/source/ui/dlg/sdtreelb.cxx:78
     #4  0x00002ba40446ccc3 in cppu::OWeakObject::release() (this=0x2501da0) at cppuhelper/source/weak.cxx:242
     #5  0x00002ba4249a6015 in cppu::WeakImplHelper<com::sun::star::datatransfer::XTransferable2, com::sun::star::datatransfer::clipboard::XClipboardOwner, com::sun::star::datatransfer::dnd::XDragSourceListener, com::sun::star::lang::XUnoTunnel>::release() (this=0x2501da0) at include/cppuhelper/implbase.hxx:115
     #6  0x00002ba40a291791 in rtl::Reference<TransferDataContainer>::~Reference() (this=0x2ea9780) at include/rtl/ref.hxx:129
    ...
     #21 0x00002ba40af10699 in UIObjectUnoObj::~UIObjectUnoObj() (this=0x2501680) at vcl/source/uitest/uno/uiobject_uno.cxx:27
    
    Change-Id: Idcd388cbe1ec78ff36f14fd39f9eb5134da873e3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112881
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 6a5476f84886..37b6379d7904 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -647,14 +647,18 @@ void SdTransferable::DragFinished( sal_Int8 nDropAction )
 
 void SdTransferable::ObjectReleased()
 {
-    if( this == SD_MOD()->pTransferClip )
-        SD_MOD()->pTransferClip = nullptr;
+    SdModule *pModule = SD_MOD();
+    if (!pModule)
+        return;
+
+    if( this == pModule->pTransferClip )
+        pModule->pTransferClip = nullptr;
 
-    if( this == SD_MOD()->pTransferDrag )
-        SD_MOD()->pTransferDrag = nullptr;
+    if( this == pModule->pTransferDrag )
+        pModule->pTransferDrag = nullptr;
 
-    if( this == SD_MOD()->pTransferSelection )
-        SD_MOD()->pTransferSelection = nullptr;
+    if( this == pModule->pTransferSelection )
+        pModule->pTransferSelection = nullptr;
 }
 
 void SdTransferable::SetObjectDescriptor( std::unique_ptr<TransferableObjectDescriptor> pObjDesc )


More information about the Libreoffice-commits mailing list