diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index e7b4d65652d..ed148da2dd3 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,7 @@ +2003-04-17 Mikhail Khodjaiants + Check if the underlying cdi variable is not null before accessing it. + * CVariable.java + 2003-04-16 Mikhail Khodjaiants Quick fix for variable values. * CValue.java diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java index 2a027d158c1..3c628b4e3b7 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java @@ -339,8 +339,8 @@ public abstract class CVariable extends CDebugElement */ protected ICDIValue retrieveValue() throws DebugException, CDIException { - return ( ((IDebugTarget)getParent().getDebugTarget()).isSuspended() ) ? - getCDIVariable().getValue() : getLastKnownValue(); + return ( ((IDebugTarget)getParent().getDebugTarget()).isSuspended() && getCDIVariable() != null ) ? + getCDIVariable().getValue() : getLastKnownValue(); } /* (non-Javadoc) @@ -348,7 +348,7 @@ public abstract class CVariable extends CDebugElement */ public String getName() throws DebugException { - return getOriginalCDIVariable().getName(); + return ( getOriginalCDIVariable() != null ) ? getOriginalCDIVariable().getName() : null; } /* (non-Javadoc)