Kaydet (Commit) 115fa590 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

More plausible fix

...for 7c465e7f "coverity#1326260 Explicit null
dereferenced"

Change-Id: I3b7fb8195c29b7e447fbe31f823cd00d7a820e95
üst 5b7e8efb
......@@ -246,8 +246,10 @@ public abstract class BaseNLPSolver extends WeakBase
RowInfo currentRow = null;
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 != null && currentRow.EndCol == m_variables[i].Column - 1)
boolean match = lastSheet == m_variables[i].Sheet &&
lastRow == m_variables[i].Row;
assert !match || currentRow != null;
if (match && currentRow.EndCol == m_variables[i].Column - 1)
currentRow.EndCol++;
else {
currentRow = new RowInfo(m_variables[i].Sheet, m_variables[i].Row);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment