Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2005-06-16 19:23:34 +0000
committerMikhail Khodjaiants2005-06-16 19:23:34 +0000
commit652898366bda10dbd4f0631a884ad4aee5ca2b16 (patch)
tree273454b6a93d2165ca243018068a2d24bf13372d
parente6211fb7102b8ec7806d13fb1cea509685200933 (diff)
downloadorg.eclipse.cdt-652898366bda10dbd4f0631a884ad4aee5ca2b16.tar.gz
org.eclipse.cdt-652898366bda10dbd4f0631a884ad4aee5ca2b16.tar.xz
org.eclipse.cdt-652898366bda10dbd4f0631a884ad4aee5ca2b16.zip
Bug 100447: NPE generated when Run To Line in Disassembly view.
-rw-r--r--debug/org.eclipse.cdt.debug.ui/ChangeLog5
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineAdapter.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineAdapter.java2
3 files changed, 7 insertions, 2 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog
index f088e3fa3d4..c8c1e815a18 100644
--- a/debug/org.eclipse.cdt.debug.ui/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog
@@ -1,4 +1,9 @@
2005-06-12 Mikhail Khodjaiants
+ Bug 100447: NPE generated when Run To Line in Disassembly view.
+ * ResumeAtLineAdapter.java
+ * RunToLineAdapter.java
+
+2005-06-12 Mikhail Khodjaiants
Temporary fix for bug 79872: Make instruction stepping default in disassembly view.
* DisassemblyView.java
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineAdapter.java
index fb7bfea430c..f15487b7fab 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineAdapter.java
@@ -93,7 +93,7 @@ public class ResumeAtLineAdapter implements IResumeAtLineTarget {
ITextSelection textSelection = (ITextSelection)selection;
int lineNumber = textSelection.getStartLine() + 1;
final IAddress address = ((DisassemblyEditorInput)input).getAddress( lineNumber );
- if ( target instanceof IAdaptable ) {
+ if ( address != null && target instanceof IAdaptable ) {
final IJumpToAddress jumpToAddress = (IJumpToAddress)((IAdaptable)target).getAdapter( IJumpToAddress.class );
if ( jumpToAddress != null && jumpToAddress.canJumpToAddress( address ) ) {
Runnable r = new Runnable() {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineAdapter.java
index 708015a2383..5daf3ed0c2d 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineAdapter.java
@@ -96,7 +96,7 @@ public class RunToLineAdapter implements IRunToLineTarget {
ITextSelection textSelection = (ITextSelection)selection;
int lineNumber = textSelection.getStartLine() + 1;
final IAddress address = ((DisassemblyEditorInput)input).getAddress( lineNumber );
- if ( target instanceof IAdaptable ) {
+ if ( address != null && target instanceof IAdaptable ) {
final IRunToAddress runToAddress = (IRunToAddress)((IAdaptable)target).getAdapter( IRunToAddress.class );
if ( runToAddress != null && runToAddress.canRunToAddress( address ) ) {
Runnable r = new Runnable() {

Back to the top