diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-02-07 22:22:12 +0100 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-02-07 16:31:53 -0500 |
commit | 9fe8668203eae2f66c837b266847d639a5dac42c (patch) | |
tree | 77f90c462601a70e7d8f58b92ae6b28ed9bf7893 /sc | |
parent | 00ae381d515d67401b1800280083c9356bf5bd5f (diff) |
Resolves: fdo#60420 Copy chart leads to crash
Thank you Kohei for the better patch you proposed to me
Change-Id: I145aaf6fd139a29373c41cc2ea81dadc9160f0fe
(cherry picked from commit 7e2f34a3172a756a0fd70cae1294250206945a6e)
Signed-off-by: Kohei Yoshida <kohei.yoshida@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/column.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 5fb98a2b2f1c..ac4850ecea09 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -1258,8 +1258,11 @@ void ScColumn::CopyStaticToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol // Determine the range of cells in the original column that need to be copied. it = std::find_if(maItems.begin(), maItems.end(), FindInRows(nRow1, nRow2)); - if (it != maItems.end()) - itEnd = std::find_if(it, maItems.end(), FindAboveRow(nRow2)); + if (it == maItems.end()) + // Nothing to copy. + return; + + itEnd = std::find_if(it, maItems.end(), FindAboveRow(nRow2)); // Clone and staticize all cells that need to be copied. std::vector<ColEntry> aCopied; |