mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +02:00
Bug 309032: Fixed NPE I'm seeing intermittently during session shutdown.
This commit is contained in:
parent
5a1558ddd2
commit
ca94f732f9
1 changed files with 8 additions and 2 deletions
|
@ -151,9 +151,15 @@ public class CMemoryBlockRetrievalExtension extends PlatformObject implements IM
|
|||
*
|
||||
* @param expression
|
||||
* @return
|
||||
* @throws DebugException if target not available
|
||||
*/
|
||||
private BigInteger evaluateLiteralAddress(String addr) {
|
||||
IAddressFactory addrFactory = getDebugTarget().getAddressFactory();
|
||||
private BigInteger evaluateLiteralAddress(String addr) throws DebugException {
|
||||
CDebugTarget target = getDebugTarget();
|
||||
if (target == null) {
|
||||
throw new DebugException(new Status(IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED,
|
||||
InternalDebugCoreMessages.getString("CMemoryBlockRetrievalExtension.CDebugTarget_not_available"), null)); //$NON-NLS-1$
|
||||
}
|
||||
IAddressFactory addrFactory = target.getAddressFactory();
|
||||
if (addrFactory instanceof IAddressFactory2) {
|
||||
return ((IAddressFactory2)addrFactory).createAddress(addr, false).getValue();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue