summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo/undocell.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-03-21 22:09:53 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-03-22 21:49:23 -0400
commit304fabda76364301956333120bf86b5a0ea9fe04 (patch)
tree6a327b37f7fc40733c4152d62a5544373c1686de /sc/source/ui/undo/undocell.cxx
parente84bf20fb0368bfe7873f9fb46023f1c9f35ac15 (diff)
Don't forget to check for NULL pointer here, else it would crash.
Change-Id: I497a8f5a6210e0b03fb12adc376cfa3a11d2d47c
Diffstat (limited to 'sc/source/ui/undo/undocell.cxx')
-rw-r--r--sc/source/ui/undo/undocell.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 574ddba62cc4..868dff59a373 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -186,7 +186,8 @@ struct DeleteCell : std::unary_function<ScUndoEnterData::Value, void>
{
void operator() (ScUndoEnterData::Value& rVal)
{
- rVal.mpCell->Delete();
+ if (rVal.mpCell)
+ rVal.mpCell->Delete();
}
};