diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-02-07 22:22:12 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-02-07 22:23:58 +0100 |
commit | 7e2f34a3172a756a0fd70cae1294250206945a6e (patch) | |
tree | d7d898346cc397b9b047c8268d94e17a1cecd369 /sc | |
parent | b294527d9ffd0945116b3cd98105c4187798f474 (diff) |
Resolves: fdo#60420 Copy chart leads to crash
Thank you Kohei for the better patch you proposed to me
Change-Id: I145aaf6fd139a29373c41cc2ea81dadc9160f0fe
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 ad156efa9507..ac5f1d581c12 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -1245,8 +1245,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; |