summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svx/source/svdraw/svdmodel.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 4e9c6e45bda5..75993f6dfac1 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1996,13 +1996,13 @@ SvxNumType SdrModel::GetPageNumType() const
const SdrPage* SdrModel::GetPage(sal_uInt16 nPgNum) const
{
DBG_ASSERT(nPgNum < maPages.size(), "SdrModel::GetPage: Access out of range (!)");
- return maPages[nPgNum];
+ return nPgNum < maPages.size() ? maPages[nPgNum] : NULL;
}
SdrPage* SdrModel::GetPage(sal_uInt16 nPgNum)
{
DBG_ASSERT(nPgNum < maPages.size(), "SdrModel::GetPage: Access out of range (!)");
- return maPages[nPgNum];
+ return nPgNum < maPages.size() ? maPages[nPgNum] : NULL;
}
sal_uInt16 SdrModel::GetPageCount() const