mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 01:45:33 +02:00
Fix potential null pointer use
This commit is contained in:
parent
fff45080d0
commit
213901d450
3 changed files with 8 additions and 4 deletions
|
@ -416,7 +416,9 @@ public class MemoryBrowser extends ViewPart implements IDebugContextListener, IM
|
||||||
} catch (DebugException e1) {
|
} catch (DebugException e1) {
|
||||||
fGotoAddressBar.handleExpressionStatus(new Status(Status.ERROR, MemoryBrowserPlugin.PLUGIN_ID,
|
fGotoAddressBar.handleExpressionStatus(new Status(Status.ERROR, MemoryBrowserPlugin.PLUGIN_ID,
|
||||||
Messages.getString("MemoryBrowser.FailedToGoToAddressTitle"), e1)); //$NON-NLS-1$
|
Messages.getString("MemoryBrowser.FailedToGoToAddressTitle"), e1)); //$NON-NLS-1$
|
||||||
|
if (item != null) {
|
||||||
item.dispose();
|
item.dispose();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1235,7 +1235,7 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
||||||
|
|
||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
|
|
||||||
if(fStartHigh == null || !high.equals(fStartHigh))
|
if(fStartHigh == null || !fStartHigh.equals(high))
|
||||||
{
|
{
|
||||||
fStartHigh = high;
|
fStartHigh = high;
|
||||||
changed = true;
|
changed = true;
|
||||||
|
@ -1267,7 +1267,7 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
||||||
|
|
||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
|
|
||||||
if(fEndHigh == null || !high.equals(fEndHigh))
|
if(fEndHigh == null || !fEndHigh.equals(high))
|
||||||
{
|
{
|
||||||
fEndHigh = high;
|
fEndHigh = high;
|
||||||
changed = true;
|
changed = true;
|
||||||
|
|
|
@ -99,10 +99,12 @@ public class ExportMemoryAction implements IViewActionDelegate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if (memBlock != null) {
|
||||||
initialStartAddr = BigInteger.valueOf(memBlock.getStartAddress());
|
initialStartAddr = BigInteger.valueOf(memBlock.getStartAddress());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return new BlockAndAddress(memBlock, initialStartAddr);
|
return new BlockAndAddress(memBlock, initialStartAddr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue