1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix potential null pointer use

This commit is contained in:
John Cortell 2010-09-02 16:44:02 +00:00
parent fff45080d0
commit 213901d450
3 changed files with 8 additions and 4 deletions

View file

@ -416,7 +416,9 @@ public class MemoryBrowser extends ViewPart implements IDebugContextListener, IM
} catch (DebugException e1) {
fGotoAddressBar.handleExpressionStatus(new Status(Status.ERROR, MemoryBrowserPlugin.PLUGIN_ID,
Messages.getString("MemoryBrowser.FailedToGoToAddressTitle"), e1)); //$NON-NLS-1$
item.dispose();
if (item != null) {
item.dispose();
}
return;
}
} else {

View file

@ -1235,7 +1235,7 @@ public class Rendering extends Composite implements IDebugEventSetListener
boolean changed = false;
if(fStartHigh == null || !high.equals(fStartHigh))
if(fStartHigh == null || !fStartHigh.equals(high))
{
fStartHigh = high;
changed = true;
@ -1267,7 +1267,7 @@ public class Rendering extends Composite implements IDebugEventSetListener
boolean changed = false;
if(fEndHigh == null || !high.equals(fEndHigh))
if(fEndHigh == null || !fEndHigh.equals(high))
{
fEndHigh = high;
changed = true;

View file

@ -99,7 +99,9 @@ public class ExportMemoryAction implements IViewActionDelegate {
}
}
else {
initialStartAddr = BigInteger.valueOf(memBlock.getStartAddress());
if (memBlock != null) {
initialStartAddr = BigInteger.valueOf(memBlock.getStartAddress());
}
}
}
}