[Libreoffice-commits] .: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Nov 25 04:14:43 PST 2012


 sw/source/core/frmedt/fefly1.cxx |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit ff7eb03c4ad1027eb7dbcac73858f726ae558915
Author: jailletc36 <christophe.jaillet at wanadoo.fr>
Date:   Sat Nov 24 08:12:05 2012 +0100

    cppCheck: Possible NULL pointer dereference
    
    Change-Id: I1d740eea5c26e0515835c4dc6199a387b6fa8f6b
    Signed-off-by: jailletc36 <christophe.jaillet at wanadoo.fr>
    Reviewed-on: https://gerrit.libreoffice.org/1154
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 2673b31..50ef8d7 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();
     }


More information about the Libreoffice-commits mailing list