diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-28 10:21:30 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-28 13:13:59 +0000 |
commit | 2e82733434cb1488cecd41d438a10b7b02a436fc (patch) | |
tree | beb919180647b86d15a64396bc199bb30f9b2e78 /sc/source | |
parent | coverity#982765 Dereference null return value (diff) | |
download | core-2e82733434cb1488cecd41d438a10b7b02a436fc.tar.gz core-2e82733434cb1488cecd41d438a10b7b02a436fc.zip |
coverity#982764 Dereference null return value
Change-Id: Ib0f01bf529a739e5f92cd41979c18d76d7b545d1
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/dbgui/pvlaydlg.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index 104462b9c19e..6dfee0c2fff5 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -395,10 +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); @@ -454,6 +454,8 @@ void ScPivotLayoutDlg::AppendField(size_t nFromIndex, ScPivotFieldType eToType) size_t nAt = 0; ScDPFieldControlBase* toWnd = GetFieldWindow(eToType); + if (!toWnd) + return; ScDPFieldControlBase* rmWnd1 = NULL; ScDPFieldControlBase* rmWnd2 = NULL; GetOtherFieldWindows(eToType, rmWnd1, rmWnd2); |