Check pointer before use

Change-Id: I06a19b4e6a5fa892c8aec555e5416fda7fe24146
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127090
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127155
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index a18e74c..774576d 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2782,7 +2782,7 @@ void SwContentTree::ToggleToRoot()
        {
            for (ContentTypeId i : o3tl::enumrange<ContentTypeId>())
            {
                if (i != m_nLastSelType)
                if (i != m_nLastSelType && m_aActiveContentArr[i])
                    m_aActiveContentArr[i]->FillMemberList();
            }
        }