tdf#141307: adapt null-check

- if we check pNd for nullptr, we need to expect it to be nullptr
- in that case we shouldnt use the pointer before the null check

Change-Id: Ia9d11abe32fac10f36fdbfcefeadd51891f1834e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115264
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index 3dfed9e..d8f3788 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -63,11 +63,11 @@ SwAccessibleNoTextFrame::SwAccessibleNoTextFrame(
    msDesc()
{
    const SwNoTextNode* pNd = GetNoTextNode();
    StartListening(const_cast<SwNoTextNode*>(pNd)->GetNotifier());
    // #i73249#
    // consider new attributes Title and Description
    if( pNd )
    {
        StartListening(const_cast<SwNoTextNode*>(pNd)->GetNotifier());
        msTitle = pNd->GetTitle();

        msDesc = pNd->GetDescription();