summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java
index fbb53f9b64ed..16bb7e861605 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java
@@ -247,7 +247,7 @@ public abstract class BaseNLPSolver extends WeakBase
int lastSheet = -1, lastRow = -1;
for (int i = 0; i < m_variableCount; i++) {
if (lastSheet == m_variables[i].Sheet && lastRow == m_variables[i].Row &&
- currentRow.EndCol == m_variables[i].Column - 1)
+ currentRow != null && currentRow.EndCol == m_variables[i].Column - 1)
currentRow.EndCol++;
else {
currentRow = new RowInfo(m_variables[i].Sheet, m_variables[i].Row);