mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 03:05:39 +02:00
Bug 100447: NPE generated when Run To Line in Disassembly view.
This commit is contained in:
parent
e6211fb710
commit
652898366b
3 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
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
|
2005-06-12 Mikhail Khodjaiants
|
||||||
Temporary fix for bug 79872: Make instruction stepping default in disassembly view.
|
Temporary fix for bug 79872: Make instruction stepping default in disassembly view.
|
||||||
* DisassemblyView.java
|
* DisassemblyView.java
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class ResumeAtLineAdapter implements IResumeAtLineTarget {
|
||||||
ITextSelection textSelection = (ITextSelection)selection;
|
ITextSelection textSelection = (ITextSelection)selection;
|
||||||
int lineNumber = textSelection.getStartLine() + 1;
|
int lineNumber = textSelection.getStartLine() + 1;
|
||||||
final IAddress address = ((DisassemblyEditorInput)input).getAddress( lineNumber );
|
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 );
|
final IJumpToAddress jumpToAddress = (IJumpToAddress)((IAdaptable)target).getAdapter( IJumpToAddress.class );
|
||||||
if ( jumpToAddress != null && jumpToAddress.canJumpToAddress( address ) ) {
|
if ( jumpToAddress != null && jumpToAddress.canJumpToAddress( address ) ) {
|
||||||
Runnable r = new Runnable() {
|
Runnable r = new Runnable() {
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class RunToLineAdapter implements IRunToLineTarget {
|
||||||
ITextSelection textSelection = (ITextSelection)selection;
|
ITextSelection textSelection = (ITextSelection)selection;
|
||||||
int lineNumber = textSelection.getStartLine() + 1;
|
int lineNumber = textSelection.getStartLine() + 1;
|
||||||
final IAddress address = ((DisassemblyEditorInput)input).getAddress( lineNumber );
|
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 );
|
final IRunToAddress runToAddress = (IRunToAddress)((IAdaptable)target).getAdapter( IRunToAddress.class );
|
||||||
if ( runToAddress != null && runToAddress.canRunToAddress( address ) ) {
|
if ( runToAddress != null && runToAddress.canRunToAddress( address ) ) {
|
||||||
Runnable r = new Runnable() {
|
Runnable r = new Runnable() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue