summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2016-04-19 09:23:30 +0100
committerMichael Meeks <michael.meeks@collabora.com>2016-04-19 09:11:41 +0000
commit1abcf1bcbfa90ee1714b4d37fb38b639dabbcdfe (patch)
treebc1abc331354f6e01ece4a3eebbe1655db0a6fb8 /sd
parent35abb3aacb4072171e8c580e1306e3c44e368646 (diff)
tdf#99387 - protect LOK document size API from corner-cases.
Change-Id: I5dd1d37ea783a65f0c8f3ad9c3c9cabf72ae036d Reviewed-on: https://gerrit.libreoffice.org/24239 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 449b54a1a60b..604d076a40b1 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2352,7 +2352,13 @@ Size SdXImpressDocument::getDocumentSize()
if (!pViewSh)
return Size();
- SdrPageView* pCurPageView = pViewSh->GetView()->GetSdrPageView();
+ SdrView *pSdrView = pViewSh->GetView();
+ if (!pSdrView)
+ return Size();
+
+ SdrPageView* pCurPageView = pSdrView->GetSdrPageView();
+ if (!pCurPageView)
+ return Size();
Size aSize = pCurPageView->GetPageRect().GetSize();
// Convert the size in 100th mm to TWIP