summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 0891bba478b8..d880e4817506 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -211,7 +211,7 @@ static SwPrintUIOptions * lcl_GetPrintUIOptions(
{
sal_uInt16 nMax = nCurrentPage;
const SwPageFrame *pPage = dynamic_cast<const SwPageFrame*>(pFrame->Lower());
- for ( ; nMax-- > 0; )
+ while (pPage && nMax-- > 0)
{
if (pPage->Frame().Height() == 0)
nCurrentPage--;