Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-09-07 15:26:17 -0400
committereutarass2011-09-07 15:26:17 -0400
commitd622d04b0bb1b83561b99822dd353142734d2e94 (patch)
tree397b41b2a93e565b4de1823a3d51cfd1f6412833 /plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse
parent590e2fe28009e80e85b2822ee5b9711ecabd3c3e (diff)
downloadorg.eclipse.tcf-d622d04b0bb1b83561b99822dd353142734d2e94.tar.gz
org.eclipse.tcf-d622d04b0bb1b83561b99822dd353142734d2e94.tar.xz
org.eclipse.tcf-d622d04b0bb1b83561b99822dd353142734d2e94.zip
TCF Debugger: fixed: opening Symbol Files dialog for already closed debug session can cause NPE.
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapWidget.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapWidget.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapWidget.java
index 77eadcafa..37e2e88c2 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapWidget.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapWidget.java
@@ -133,7 +133,8 @@ public class MemoryMapWidget {
BigInteger x = column == 1 ? r.addr : r.size;
if (x == null) return "";
String s = x.toString(16);
- int sz = mem_ctx.getAddressSize() * 2;
+ int sz = 0;
+ if (mem_ctx != null) sz = mem_ctx.getAddressSize() * 2;
int l = sz - s.length();
if (l < 0) l = 0;
if (l > 16) l = 16;
@@ -467,7 +468,7 @@ public class MemoryMapWidget {
}
private String getSelectedMemoryNode() {
- if (channel == null) return null;
+ if (channel == null || channel.getState() != IChannel.STATE_OPEN) return null;
try {
return new TCFTask<String>(channel) {
public void run() {
@@ -511,7 +512,7 @@ public class MemoryMapWidget {
private void loadTargetMemoryNodes() {
target_map_nodes.clear();
- if (channel == null) return;
+ if (channel == null || channel.getState() != IChannel.STATE_OPEN) return;
try {
new TCFTask<Boolean>(channel) {
public void run() {
@@ -559,7 +560,7 @@ public class MemoryMapWidget {
loaded_files.clear();
target_map.clear();
mem_ctx = null;
- if (channel == null) return;
+ if (channel == null || channel.getState() != IChannel.STATE_OPEN) return;
try {
new TCFTask<Boolean>(channel) {
public void run() {

Back to the top