1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Fix NPE in action adapters when editor is not fed by a file.

This commit is contained in:
John Cortell 2008-04-30 22:57:21 +00:00
parent cfc37b5788
commit 83332ab6f8
2 changed files with 6 additions and 2 deletions

View file

@ -152,11 +152,13 @@ public class ResumeAtLineAdapter implements IResumeAtLineTarget {
if ( document == null ) {
return false;
}
String fileName; // actually, absolute path, not just file name
String fileName = null; // actually, absolute path, not just file name
try {
fileName = getFileName( input );
}
catch( CoreException e ) {
}
if (fileName == null) {
return false;
}
IDebugTarget debugTarget = null;

View file

@ -155,11 +155,13 @@ public class RunToLineAdapter implements IRunToLineTarget {
if ( document == null ) {
return false;
}
String fileName; // actually, absolute path, not just file name
String fileName = null; // actually, absolute path, not just file name
try {
fileName = getFileName( input );
}
catch( CoreException e ) {
}
if (fileName == null) {
return false;
}
IDebugTarget debugTarget = null;