From 4cd3f9a7749b8ef285012a59d031dc9f2e4b5e43 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 26 Jun 2015 15:20:14 +0200 Subject: fix crash on exporting kde140265-1.doc to ODT properties.pSGlobalShell can be legitimately 0 here. No testcase, for some reason the export does not crash if it's done by CppunitTest_sw_filters_test or CppunitTest_sw_odfexport; but it does crash with '--headless --convert-to odt kde140265-1.doc'. Change-Id: I50936f9e5236763cc987aba14d8fc897c4b789bf --- sw/source/core/layout/paintfrm.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 017389b5decb..67e6e1595d08 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1510,7 +1510,7 @@ static void lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm, } } - ::SwAlignRect( rRect, properties.pSGlobalShell, properties.pSGlobalShell->GetOut() ); + ::SwAlignRect( rRect, properties.pSGlobalShell, properties.pSGlobalShell ? properties.pSGlobalShell->GetOut() : 0 ); } /** -- cgit