diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageFunctionBreakpointActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageFunctionBreakpointActionDelegate.java index a114d04a09e..fc6c868edb9 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageFunctionBreakpointActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageFunctionBreakpointActionDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -88,9 +88,11 @@ public class ManageFunctionBreakpointActionDelegate extends ActionDelegate imple IContributedContentsView contentsView = (IContributedContentsView) fTargetPart.getAdapter(IContributedContentsView.class); if (contentsView != null) { IWorkbenchPart contributingPart = contentsView.getContributingPart(); - resource = (IResource) contributingPart.getAdapter(IResource.class); - if (resource == null && contributingPart instanceof IEditorPart) { - resource = (IResource) ((IEditorPart)contributingPart).getEditorInput().getAdapter(IResource.class); + if (contributingPart != null) { + resource = (IResource) contributingPart.getAdapter(IResource.class); + if (resource == null && contributingPart instanceof IEditorPart) { + resource = (IResource) ((IEditorPart)contributingPart).getEditorInput().getAdapter(IResource.class); + } } } }