summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/tool/scmatrix.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index fdba2f1b7989..7f1d915ec6c7 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -2183,8 +2183,9 @@ ScMatrixRef ScMatrixImpl::CompareMatrix(
// We assume the result matrix has the same dimension as this matrix.
const std::vector<double>& rResVal = aFunc.getValues();
+ assert (nSize == rResVal.size());
if (nSize != rResVal.size())
- ScMatrixRef();
+ return ScMatrixRef();
return ScMatrixRef(new ScMatrix(aSize.column, aSize.row, rResVal));
}
@@ -2195,8 +2196,9 @@ ScMatrixRef ScMatrixImpl::CompareMatrix(
// We assume the result matrix has the same dimension as this matrix.
const std::vector<double>& rResVal = aFunc.getValues();
+ assert (nSize == rResVal.size());
if (nSize != rResVal.size())
- ScMatrixRef();
+ return ScMatrixRef();
return ScMatrixRef(new ScMatrix(aSize.column, aSize.row, rResVal));
}