coverity#1130423 Dereference null return value

Change-Id: If6981a9654a114e34dad931381ea071d5169adc2
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 0b8a632..306206c 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -1164,19 +1164,23 @@ sal_uInt16 SwDocShell::MakeByExample( const OUString &rName, sal_uInt16 nFamily,

        case SFX_STYLE_FAMILY_PSEUDO:
        {
            pCurrWrtShell->StartAllAction();
            const SwNumRule* pCurRule = pCurrWrtShell->GetCurNumRule();

            SwNumRule aRule( *pCurrWrtShell->GetCurNumRule() );
            OUString sOrigRule( aRule.GetName() );
            // #i91400#
            aRule.SetName( pStyle->GetNumRule()->GetName(),
                           *(pCurrWrtShell->GetDoc()) );
            pCurrWrtShell->ChgNumRuleFmts( aRule );
            if (pCurRule)
            {
                pCurrWrtShell->StartAllAction();

            pCurrWrtShell->ReplaceNumRule( sOrigRule, aRule.GetName() );
                SwNumRule aRule( *pCurRule );
                OUString sOrigRule( aRule.GetName() );
                // #i91400#
                aRule.SetName( pStyle->GetNumRule()->GetName(),
                               *(pCurrWrtShell->GetDoc()) );
                pCurrWrtShell->ChgNumRuleFmts( aRule );

                pCurrWrtShell->ReplaceNumRule( sOrigRule, aRule.GetName() );

            pCurrWrtShell->EndAllAction();
                pCurrWrtShell->EndAllAction();
            }
        }
        break;
    }