mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 22:22:11 +02:00
Bug 150471: NPE in ToggleBreakpointAdapter.
This commit is contained in:
parent
30060e8e7d
commit
dbaba763e1
1 changed files with 5 additions and 3 deletions
|
@ -314,9 +314,11 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTarget {
|
|||
ILocationProvider provider = (ILocationProvider)editorInput.getAdapter( ILocationProvider.class );
|
||||
if ( provider != null ) {
|
||||
IPath location = provider.getPath( editorInput );
|
||||
IFile[] files = root.findFilesForLocation( location );
|
||||
if ( files.length > 0 )
|
||||
return files[0];
|
||||
if ( location != null ) {
|
||||
IFile[] files = root.findFilesForLocation( location );
|
||||
if ( files.length > 0 )
|
||||
return files[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
return root;
|
||||
|
|
Loading…
Add table
Reference in a new issue