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

guard against missing RootDocument

Change-Id: I1c6b58b58ab489a17419dbf7cd4ecec63359b7f3
üst 7640de3d
......@@ -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