Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java
index 51e7d164a4d..1edc56dacba 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java
@@ -129,9 +129,8 @@ public class CValue extends CDebugElement implements ICValue
List vars = getCDIVariables();
if ( getType() == ICValue.TYPE_ARRAY )
{
- int length = getNumberOfChildren();
- if ( length > 0 )
- fVariables = CArrayPartition.splitArray( (CDebugTarget)getDebugTarget(), vars, 0, length - 1 );
+ if ( vars.size() > 0 )
+ fVariables = CArrayPartition.splitArray( (CDebugTarget)getDebugTarget(), vars, 0, vars.size() - 1 );
}
else
{

Back to the top