summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-07 20:48:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-08 09:18:35 +0100
commitd546224464df4fcc85ad978fa149d876d093d714 (patch)
tree1e9cd8d6c5757be66800ebc7a2e705fecad7d3e1 /sw/source/ui
parent752b8ebb265938e1e6dc434b226cc0667d99cc1b (diff)
coverity#705015 Explicit null dereferenced
Change-Id: Idac9493e152f639066cf497be897b8a489c39f6c
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/fldui/fldedt.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 053ea40fe929..65e5c99962db 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -183,9 +183,13 @@ SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup)
}
- static_cast<SwFldPage*>(pTabPage)->SetWrtShell(pSh);
+ assert(pTabPage);
- SetTabPage(pTabPage);
+ if (pTabPage)
+ {
+ static_cast<SwFldPage*>(pTabPage)->SetWrtShell(pSh);
+ SetTabPage(pTabPage);
+ }
return pTabPage;
}