diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 12:41:48 +0000 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2015-12-09 12:55:38 +0000 |
commit | 2e34ce925aba7ffbb61ab909fd77722cb192eae9 (patch) | |
tree | bb480d6cd919d7366c6a821b4964a06ab3dca76b /lotuswordpro | |
parent | 02244358dc3021cb23dcb12e06594c1c6f3b0e42 (diff) |
guard against missing RootDocument
Change-Id: I1c6b58b58ab489a17419dbf7cd4ecec63359b7f3
(cherry picked from commit 0f700d5bc9c0ebc1e1ebe60758fbbf02590790bc)
Reviewed-on: https://gerrit.libreoffice.org/20516
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'lotuswordpro')
-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 a2ff123d6170..e3412fc90117 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; |