Kaydet (Commit) 2e34ce92 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) David Tardon

guard against missing RootDocument

Change-Id: I1c6b58b58ab489a17419dbf7cd4ecec63359b7f3
(cherry picked from commit 0f700d5b)
Reviewed-on: https://gerrit.libreoffice.org/20516Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst 02244358
...@@ -634,8 +634,8 @@ LwpDocument* LwpDocument::GetPreviousDivision() ...@@ -634,8 +634,8 @@ LwpDocument* LwpDocument::GetPreviousDivision()
LwpDocument* LwpDocument::GetLastDivisionThatHasEndnote() LwpDocument* LwpDocument::GetLastDivisionThatHasEndnote()
{ {
LwpDocument* pRoot = GetRootDocument(); LwpDocument* pRoot = GetRootDocument();
LwpDocument *pLastDoc = pRoot->GetLastDivisionWithContents(); LwpDocument *pLastDoc = pRoot ? pRoot->GetLastDivisionWithContents() : nullptr;
while(pLastDoc) while (pLastDoc)
{ {
if(pLastDoc->GetEnSuperTableLayout()) if(pLastDoc->GetEnSuperTableLayout())
return pLastDoc; return pLastDoc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment