summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2016-01-30 00:28:26 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2016-01-30 00:28:26 +0100
commit1296f9dc9e502abd8422dfeee1ac7747a82aee17 (patch)
tree9a8b882b52eeeffc924a8795fb6732dbb065fcdf /sw
parent8ff66c71bb4da8d0e4454e250e480eada9fe226c (diff)
tdf#89708 Fix crash on printing from print preview
Prevents crash when previewing merged documents with page ranges from a view shell without a SwWrtShell, as the print preview. Change-Id: Ifa5f3de4c006da3ea8f61a56ab499843432f3203
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 2ebaf0efeacb..972edd95ae00 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -204,7 +204,7 @@ static SwPrintUIOptions * lcl_GetPrintUIOptions(
}
// If blanks are skipped, account for them in initial page range value
- if (!rPrintData.IsPrintEmptyPages())
+ if (pSh && !rPrintData.IsPrintEmptyPages())
{
sal_uInt16 nMax = nCurrentPage;
SwPageFrame *pPage = dynamic_cast<SwPageFrame*>(pSh->GetLayout()->Lower());