mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +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,11 +314,13 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTarget {
|
||||||
ILocationProvider provider = (ILocationProvider)editorInput.getAdapter( ILocationProvider.class );
|
ILocationProvider provider = (ILocationProvider)editorInput.getAdapter( ILocationProvider.class );
|
||||||
if ( provider != null ) {
|
if ( provider != null ) {
|
||||||
IPath location = provider.getPath( editorInput );
|
IPath location = provider.getPath( editorInput );
|
||||||
|
if ( location != null ) {
|
||||||
IFile[] files = root.findFilesForLocation( location );
|
IFile[] files = root.findFilesForLocation( location );
|
||||||
if ( files.length > 0 )
|
if ( files.length > 0 )
|
||||||
return files[0];
|
return files[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue