summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-09 12:41:48 +0000
committerMichael Stahl <mstahl@redhat.com>2015-12-10 15:18:25 +0000
commitb75e793621bbac52bf72e7b1032db542cce9dac8 (patch)
tree58622edeb8ba75db72bdbeaf3f8b217e96df5f87
parent3b288a937a8369d90e3ec02b66718fbab4e9d514 (diff)
guard against missing RootDocument
Change-Id: I1c6b58b58ab489a17419dbf7cd4ecec63359b7f3 (cherry picked from commit 0f700d5bc9c0ebc1e1ebe60758fbbf02590790bc) Reviewed-on: https://gerrit.libreoffice.org/20517 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--lotuswordpro/source/filter/lwpdoc.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx
index ba6ab5838c02..fcbc8945aac7 100644
--- a/lotuswordpro/source/filter/lwpdoc.cxx
+++ b/lotuswordpro/source/filter/lwpdoc.cxx
@@ -634,8 +634,8 @@ LwpDocument* LwpDocument::GetPreviousDivision()
LwpDocument* LwpDocument::GetLastDivisionThatHasEndnote()
{
LwpDocument* pRoot = GetRootDocument();
- LwpDocument *pLastDoc = pRoot->GetLastDivisionWithContents();
- while(pLastDoc)
+ LwpDocument *pLastDoc = pRoot ? pRoot->GetLastDivisionWithContents() : nullptr;
+ while (pLastDoc)
{
if(pLastDoc->GetEnSuperTableLayout())
return pLastDoc;