diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 12:41:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 12:42:11 +0000 |
commit | 0f700d5bc9c0ebc1e1ebe60758fbbf02590790bc (patch) | |
tree | cdbc1e6a1fa11b2b81e32c4ce4209d8c301ea738 | |
parent | 7640de3db24ee59b6d36875e454b551a5f71cf37 (diff) |
guard against missing RootDocument
Change-Id: I1c6b58b58ab489a17419dbf7cd4ecec63359b7f3
-rw-r--r-- | lotuswordpro/source/filter/lwpdoc.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx index 4ad08d07f17e..b93f44da0d6d 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; |