summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-07 16:55:37 +0100
committerMichael Stahl <mstahl@redhat.com>2017-04-10 12:43:39 +0200
commit32f2370ac805513c4a968bd461d08f66958651d7 (patch)
tree9bf582043a055f44194fcbaf4f71239aa6905b26
parent75c1af593e94c049972fd929c810a9b0be23cb20 (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 (cherry picked from commit 5ce387c4812466e6752b434cf0f5a54f98c6a147) Change-Id: I68ff6f0a36462cffc47d774865e69041c4dd15a8 Reviewed-on: https://gerrit.libreoffice.org/36277 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sw/source/core/frmedt/fews.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 58d0c904f837..c3ba3a6bd6ee 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -123,12 +123,15 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
case RECT_FLY_PRT_EMBEDDED: bFrame = false;
SAL_FALLTHROUGH;
- case RECT_FLY_EMBEDDED: pFrame = xObj.is() ? FindFlyFrame( xObj )
+ case RECT_FLY_EMBEDDED:
+ {
+ const SwFrame *pFlyFrame = xObj.is() ? FindFlyFrame(xObj) : nullptr;
+ pFrame = pFlyFrame ? pFlyFrame
: pFrame->IsFlyFrame()
? pFrame
: pFrame->FindFlyFrame();
break;
-
+ }
case RECT_OUTTABSECTION_PRT:
case RECT_OUTTABSECTION : if( pFrame->IsInTab() )
pFrame = pFrame->FindTabFrame();