diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-18 14:49:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-18 15:36:20 +0100 |
commit | 1aba46ee6707f1ff4b1e0f8d2feb58b34931deb1 (patch) | |
tree | 82520658b1a50f39d91cb28441e133d354e31325 /sc | |
parent | 25ffd3fad8d38295ebcf7cc0212dcb268ef68fdb (diff) |
coverity#1226486 Dereference null return value
Change-Id: I9157f1844923e3e6ac360e859ee2cd97c33512ba
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/viewfunc.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index b139987730f5..1e4ba7fd8d75 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -1192,9 +1192,11 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, ScAddress aPos(nCol, nRow, nTab); if (rDoc.GetCellType(aPos) == CELLTYPE_EDIT) { - pOldEditData = rDoc.GetEditText(aPos)->Clone(); + const EditTextObject* pEditObj = rDoc.GetEditText(aPos); + pOldEditData = pEditObj ? pEditObj->Clone() : NULL; rDoc.RemoveEditTextCharAttribs(aPos, rAttr); - pNewEditData = rDoc.GetEditText(aPos)->Clone(); + pEditObj = rDoc.GetEditText(aPos); + pNewEditData = pEditObj ? pEditObj->Clone() : NULL; } aChangeRanges.Append(aPos); |