summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index deeb5ba397d1..66202c0aa0cb 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -176,7 +176,7 @@ void GetSelectableFromAny(uno::Reference<uno::XInterface> const& xIfc,
if (pRanges)
{
SwUnoCrsr const* pUnoCrsr = pRanges->GetCursor();
- if (pUnoCrsr->GetDoc() == &rTargetDoc)
+ if (pUnoCrsr && pUnoCrsr->GetDoc() == &rTargetDoc)
{
o_rpPaM = lcl_createPamCopy(*pUnoCrsr);
}