mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 20:35:38 +02:00
Check if the underlying cdi variable is not null before accessing it.
This commit is contained in:
parent
861d5cdfcc
commit
680f26d375
2 changed files with 7 additions and 3 deletions
|
@ -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
|
2003-04-16 Mikhail Khodjaiants
|
||||||
Quick fix for variable values.
|
Quick fix for variable values.
|
||||||
* CValue.java
|
* CValue.java
|
||||||
|
|
|
@ -339,8 +339,8 @@ public abstract class CVariable extends CDebugElement
|
||||||
*/
|
*/
|
||||||
protected ICDIValue retrieveValue() throws DebugException, CDIException
|
protected ICDIValue retrieveValue() throws DebugException, CDIException
|
||||||
{
|
{
|
||||||
return ( ((IDebugTarget)getParent().getDebugTarget()).isSuspended() ) ?
|
return ( ((IDebugTarget)getParent().getDebugTarget()).isSuspended() && getCDIVariable() != null ) ?
|
||||||
getCDIVariable().getValue() : getLastKnownValue();
|
getCDIVariable().getValue() : getLastKnownValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -348,7 +348,7 @@ public abstract class CVariable extends CDebugElement
|
||||||
*/
|
*/
|
||||||
public String getName() throws DebugException
|
public String getName() throws DebugException
|
||||||
{
|
{
|
||||||
return getOriginalCDIVariable().getName();
|
return ( getOriginalCDIVariable() != null ) ? getOriginalCDIVariable().getName() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue