diff options
-rw-r--r-- | sw/source/ui/fldui/fldref.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 994ae8f7a72f..16f2182c49ab 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -198,9 +198,12 @@ void SwFieldRefPage::Reset(const SfxItemSet* ) // fill up with the sequence types SwWrtShell *pSh = GetWrtShell(); - if(!pSh) + if (!pSh) pSh = ::GetActiveWrtShell(); + if (!pSh) + return; + const size_t nFieldTypeCnt = pSh->GetFieldTypeCount(RES_SETEXPFLD); OSL_ENSURE( nFieldTypeCnt < static_cast<size_t>(REFFLDFLAG), "<SwFieldRefPage::Reset> - Item index will overlap flags!" ); |