1
0
Fork 0
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:
Mikhail Khodjaiants 2007-04-13 13:45:07 +00:00
parent 30060e8e7d
commit dbaba763e1

View file

@ -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;