summaryrefslogtreecommitdiff
path: root/sw/source/core/frmedt
diff options
context:
space:
mode:
authorjailletc36 <christophe.jaillet@wanadoo.fr>2012-11-24 08:12:05 +0100
committerEike Rathke <erack@redhat.com>2012-11-25 12:14:23 +0000
commitff7eb03c4ad1027eb7dbcac73858f726ae558915 (patch)
treeb7dfb7d07b8cce7287ac75b69e334218f01a3935 /sw/source/core/frmedt
parenta10fc29879faf726eaf0a3d3348b14a455eac75e (diff)
cppCheck: Possible NULL pointer dereference
Change-Id: I1d740eea5c26e0515835c4dc6199a387b6fa8f6b Signed-off-by: jailletc36 <christophe.jaillet@wanadoo.fr> Reviewed-on: https://gerrit.libreoffice.org/1154 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sw/source/core/frmedt')
-rw-r--r--sw/source/core/frmedt/fefly1.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 2673b314815e..50ef8d7ad4e2 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -841,14 +841,16 @@ void SwFEShell::Insert( const String& rGrfName, const String& rFltName,
const Point aPt( GetCrsrDocPos() );
SwFlyFrm* pFrm = pFmt->GetFrm( &aPt );
- // fdo#36681: Invalidate the content and layout to refresh the picture anchoring
- // properly
- SwPageFrm* pPageFrm = pFrm->FindPageFrmOfAnchor();
- pPageFrm->InvalidateFlyLayout();
- pPageFrm->InvalidateCntnt();
-
if( pFrm )
+ {
+ // fdo#36681: Invalidate the content and layout to refresh
+ // the picture anchoring properly
+ SwPageFrm* pPageFrm = pFrm->FindPageFrmOfAnchor();
+ pPageFrm->InvalidateFlyLayout();
+ pPageFrm->InvalidateCntnt();
+
SelectFlyFrm( *pFrm, sal_True );
+ }
else
GetLayout()->SetAssertFlyPages();
}