diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java index ef846fcef3d..9999abf006b 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java @@ -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;