coverity#982764 Dereference null return value

Change-Id: Ib0f01bf529a739e5f92cd41979c18d76d7b545d1
This commit is contained in:
Caolán McNamara
2014-03-28 10:21:30 +00:00
parent a69209a415
commit 2e82733434

View File

@@ -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);