diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2016-04-19 09:23:30 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-04-19 09:23:30 +0100 |
commit | 10448704b50a5cb24d38602a76656c266f8e0366 (patch) | |
tree | 10b4f861409132f7c7e170567f25b77962966490 /sd | |
parent | 205b2be73a970508fda071310f26c0e1156da057 (diff) |
tdf#99387 - protect LOK document size API from corner-cases.
Change-Id: I5dd1d37ea783a65f0c8f3ad9c3c9cabf72ae036d
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 57fca72a89bc..adb1fc72586d 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2363,7 +2363,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 |