summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-05-27 17:24:13 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-05-28 08:59:43 +0000
commit475edbbe446df3250b3d898b8e2cc4c380c60ece (patch)
treef0868c19179c5d1bd0bf23a7ffe54fcebeacf75e
parent29babc3958687a1515eb6f4bb3b61ca0e038a09d (diff)
Resolves: tdf#91403 no wrtshell during initial layout
(cherry picked from commit ff44502d836880d2bdb057e7fdfd9b5abeb87842) (cherry picked from commit cf851cda7c943548d0ce60d0b4836ccbf6e76698) Change-Id: I0d0b8027e07f9dc2dfff584abd026d1b496d93dd Reviewed-on: https://gerrit.libreoffice.org/15933 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sw/source/ui/fldui/fldref.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 360c080c9a26..124430814c65 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -183,9 +183,12 @@ void SwFldRefPage::Reset(const SfxItemSet* )
// fill up with the sequence types
SwWrtShell *pSh = GetWrtShell();
- if(!pSh)
+ if (!pSh)
pSh = ::GetActiveWrtShell();
+ if (!pSh)
+ return;
+
const sal_uInt16 nFldTypeCnt = pSh->GetFldTypeCount(RES_SETEXPFLD);
for (sal_uInt16 n = 0; n < nFldTypeCnt; ++n)