summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-21 15:33:48 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-21 17:05:34 +0000
commit9a29cd7d26ccdd97b728a4c837c58624770122eb (patch)
treefa2125de9d333c27aeb489b8f935503e427f64ed
parent571096ab8f6ffe605c50bb92a1683d79742b1520 (diff)
coverity#1399023 Unchecked dynamic_cast
Change-Id: Id5d0a3cca9587f577000244a9776d7f1f61b5487
-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--;