summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/viewfunc.cxx6
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);