Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2013-10-24 08:53:38 -0400
committerAnton Leherbauer2013-10-24 08:53:38 -0400
commit8266544aeea4d260bf6532d5744babbcaea2a612 (patch)
tree1b3735dcd46ad67d1c4441766c0d5859f38eb9f0
parent66acca58ba0019351c62548c35e73185c9e667b8 (diff)
downloadorg.eclipse.cdt-8266544aeea4d260bf6532d5744babbcaea2a612.tar.gz
org.eclipse.cdt-8266544aeea4d260bf6532d5744babbcaea2a612.tar.xz
org.eclipse.cdt-8266544aeea4d260bf6532d5744babbcaea2a612.zip
Fix potential NPE or widget is disposed error
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyColumnSupport.java3
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java46
2 files changed, 22 insertions, 27 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyColumnSupport.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyColumnSupport.java
index 09f48dbba8c..137405570f7 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyColumnSupport.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyColumnSupport.java
@@ -175,9 +175,6 @@ class DisassemblyColumnSupport implements IColumnSupport {
if (getRuler() == null)
return false;
- if (descriptor == null)
- return false;
-
return descriptor.matchesPart(fDisassembly);
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
index f5829a7dee3..104da9d347c 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
@@ -1921,32 +1921,30 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
private void startUpdate(final Runnable update) {
if (fViewer == null)
return;
-
- final int updateCount = fUpdateCount;
- final SafeRunnable safeUpdate = new SafeRunnable() {
- @Override
+
+ final int updateCount = fUpdateCount;
+ final SafeRunnable safeUpdate = new SafeRunnable() {
+ @Override
public void run() {
- if (updateCount == fUpdateCount) {
- update.run();
- }
- }
- @Override
- public void handleException(Throwable e) {
- internalError(e);
- }
- };
- if (fUpdatePending) {
- invokeLater(new Runnable() {
- @Override
+ if (updateCount == fUpdateCount && fViewer != null) {
+ update.run();
+ }
+ }
+ @Override
+ public void handleException(Throwable e) {
+ internalError(e);
+ }
+ };
+ if (fUpdatePending) {
+ invokeLater(new Runnable() {
+ @Override
public void run() {
- if (updateCount == fUpdateCount) {
- SafeRunner.run(safeUpdate);
- }
- }
- });
- } else {
- SafeRunner.run(safeUpdate);
- }
+ SafeRunner.run(safeUpdate);
+ }
+ });
+ } else {
+ SafeRunner.run(safeUpdate);
+ }
}
private void debugContextChanged() {

Back to the top