diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-05-27 17:24:13 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-05-27 17:24:37 +0100 |
commit | ff44502d836880d2bdb057e7fdfd9b5abeb87842 (patch) | |
tree | f1c1b2a70866b0f7e5bcb2822035c46c9b71c88e | |
parent | 8cbb94a2b79dcaf9675125da800b64a85bae52dc (diff) |
Resolves: tdf#91403 no wrtshell during initial layout
Change-Id: I0d0b8027e07f9dc2dfff584abd026d1b496d93dd
-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!" ); |