1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Check if the underlying cdi variable is not null before accessing it.

This commit is contained in:
Mikhail Khodjaiants 2003-04-17 13:55:41 +00:00
parent 861d5cdfcc
commit 680f26d375
2 changed files with 7 additions and 3 deletions

View file

@ -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

View file

@ -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)