summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-07 16:55:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-07 18:37:01 +0100
commit5ce387c4812466e6752b434cf0f5a54f98c6a147 (patch)
tree0c4ab4845ce5b9585438d27055c003dfbcb6a41d
parenta7d008a8dfdc0a8b42061329b5e756b1b034abaf (diff)
Resolves: tdf#102286 lets not crash on null pFrame
this is the FlyEmbeddedPrt case ensure we don't end up with a null pFrame at return time Change-Id: I68ff6f0a36462cffc47d774865e69041c4dd15a8
-rw-r--r--sw/source/core/frmedt/fews.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 473c324b0b39..44384a5a9ec2 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -125,12 +125,14 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
bFrame = false;
SAL_FALLTHROUGH;
case CurRectType::FlyEmbedded:
- pFrame = xObj.is() ? FindFlyFrame( xObj )
+ {
+ const SwFrame *pFlyFrame = xObj.is() ? FindFlyFrame(xObj) : nullptr;
+ pFrame = pFlyFrame ? pFlyFrame
: pFrame->IsFlyFrame()
? pFrame
: pFrame->FindFlyFrame();
break;
-
+ }
case CurRectType::SectionOutsideTable :
if( pFrame->IsInTab() )
pFrame = pFrame->FindTabFrame();