[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Wed Dec 9 04:44:08 PST 2015
lotuswordpro/source/filter/lwpdoc.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit c5797fa2048c69caa3dd26861d2aa903e1a0bae4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 9 12:41:48 2015 +0000
guard against missing RootDocument
Change-Id: I1c6b58b58ab489a17419dbf7cd4ecec63359b7f3
(cherry picked from commit 0f700d5bc9c0ebc1e1ebe60758fbbf02590790bc)
Reviewed-on: https://gerrit.libreoffice.org/20515
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx
index 4ad08d0..b93f44d 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;
More information about the Libreoffice-commits
mailing list