summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2021-11-17 17:18:16 +0000
committerMichael Stahl <michael.stahl@allotropia.de>2021-11-19 15:01:21 +0100
commit91dbd398617244c6283d8b9654ba15ebb20c82c6 (patch)
tree7326d804361bd0877701607753af0893d65eae2d /sw
parent67d8c6ecb3873a8dfc789221764d7688596f09cc (diff)
Crash when fetching clipboard data.
Seems like some unusual corner-case around HTML export. sw::DocumentContentOperationsManager::CopyImplImpl(SwPaM&, SwPosition&, bool, SwPaM*, bool) const /sw/source/core/doc/DocumentContentOperationsManager.cxx:5068 sw::DocumentContentOperationsManager::CopyImpl(SwPaM&, SwPosition&, bool, SwPaM*, bool) const /sw/source/core/doc/DocumentContentOperationsManager.cxx:4609 sw::DocumentContentOperationsManager::CopyRange(SwPaM&, SwPosition&, bool, bool, bool) const /sw/source/core/doc/DocumentContentOperationsManager.cxx:1936 SwEditShell::CopySelToDoc(SwDoc*) /sw/inc/pam.hxx:193 (discriminator 2) SwFEShell::Copy(SwDoc*, rtl::OUString const*) /sw/source/core/frmedt/fecopy.cxx:224 (anonymous namespace)::lclOverWriteDoc(SwWrtShell&, SwDoc&) /sw/source/uibase/dochdl/swdtflvr.cxx:413 SwTransferable::GetData(com::sun::star::datatransfer::DataFlavor const&, rtl::OUString const&) /include/sfx2/objsh.hxx:866 TransferableHelper::getTransferData2(com::sun::star::datatransfer::DataFlavor const&, rtl::OUString const&) /include/com/sun/star/uno/Type.h:121 TransferableHelper::getTransferData(com::sun::star::datatransfer::DataFlavor const&) /include/rtl/ustring.hxx:438 getFromTransferrable.isra.0 /include/com/sun/star/uno/Any.hxx:151 encodeImageAsHTML /desktop/source/lib/init.cxx:4382 doc_getTextSelection Change-Id: I1af52d827ebdc9bbc5278f56547d1b3fd1b87e7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125456 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 5f06a273faf2..0390ad42b6d3 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -5119,8 +5119,11 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
// and not the source has the page break
if (rDoc.IsClipBoard() && (rPam.GetPageNum(pStt == rPam.GetPoint()) == 1) && !bCopyPageSource)
{
- pDestTextNd->ResetAttr(RES_BREAK); // remove the page-break
- pDestTextNd->ResetAttr(RES_PAGEDESC);
+ if (pDestTextNd)
+ {
+ pDestTextNd->ResetAttr(RES_BREAK); // remove the page-break
+ pDestTextNd->ResetAttr(RES_PAGEDESC);
+ }
}