summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-28 10:20:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-28 13:13:59 +0000
commita69209a4152c6e8a64e8467dffa9c4330fd2112f (patch)
treee393187179508a812074f98f4713989e4454d5ed /sc/source/ui/dbgui
parent22a7f8b1f5a4955e5b1500e1f58a7cdc72f1c5d9 (diff)
coverity#982765 Dereference null return value
Change-Id: I2fd5d432aff737016948a4f7bd45888cf6f4dba2
Diffstat (limited to 'sc/source/ui/dbgui')
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 8cbbcdf270ff..104462b9c19e 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -395,8 +395,10 @@ void ScPivotLayoutDlg::AddField( size_t nFromIndex, ScPivotFieldType eToType, co
if (!bAllowed)
return;
- size_t nAt = 0;
ScDPFieldControlBase* toWnd = GetFieldWindow(eToType);
+ if (!toWnd)
+ return;
+ size_t nAt = 0;
ScDPFieldControlBase* rmWnd1 = NULL;
ScDPFieldControlBase* rmWnd2 = NULL;
GetOtherFieldWindows(eToType, rmWnd1, rmWnd2);