diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-11-01 21:56:10 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-11-01 22:39:23 +0100 |
commit | cf0dd2113527ba0a601c5c59de7f7f44da161d21 (patch) | |
tree | deca4e25e0d2c19a866d981c0faefcc95d00f091 | |
parent | 2f46c82072470599f1fe92dc2235873d6a5ef4ac (diff) |
prevent access to non existing mdds elements (fdo#41807)
-rw-r--r-- | sc/source/core/tool/scmatrix.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index 6044003ccb94..1767fceefe7b 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -591,8 +591,10 @@ bool ScMatrixImpl::IsEmpty( SCSIZE nC, SCSIZE nR ) const bool ScMatrixImpl::IsEmptyPath( SCSIZE nC, SCSIZE nR ) const { // 'Empty path' is empty plus non-zero flag. - ValidColRowReplicated( nC, nR ); - return maMat.get_type(nR, nC) == ::mdds::element_empty && maMat.get_flag(nR, nC) != 0; + if (ValidColRowReplicated( nC, nR )) + return maMat.get_type(nR, nC) == ::mdds::element_empty && maMat.get_flag(nR, nC) != 0; + else + return true; } bool ScMatrixImpl::IsValue( SCSIZE nIndex ) const |