[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - sw/source

Miklos Vajna vmiklos at collabora.co.uk
Wed Jan 14 04:45:01 PST 2015


 sw/source/core/layout/pagechg.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8bbcd0315247b945bff1be718b1f2c132b1f08b5
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jan 14 13:31:27 2015 +0100

    sw: missing nullptr check
    
    As pointed out by JunitTest_sw_unoapi.
    
    Change-Id: Ia553dfb48215fab44f4899223c63ee454ff1c648

diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 9bda8c4..4c8d4e5 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -2026,7 +2026,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
 
             // center page if possible
             long nSizeDiff = 0;
-            if (nVisWidth > nCurrentRowWidth && !GetCurrShell()->isTiledRendering())
+            if (nVisWidth > nCurrentRowWidth && !(GetCurrShell() && GetCurrShell()->isTiledRendering()))
                 nSizeDiff = ( nVisWidth - nCurrentRowWidth ) / 2;
 
             // adjust positions of pages in current row


More information about the Libreoffice-commits mailing list