Kaydet (Commit) c5797fa2 authored tarafından Caolán McNamara's avatar Caolán McNamara

guard against missing RootDocument

Change-Id: I1c6b58b58ab489a17419dbf7cd4ecec63359b7f3
(cherry picked from commit 0f700d5b)
Reviewed-on: https://gerrit.libreoffice.org/20515Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 7983fe7c
......@@ -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;
......
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