mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 20:15:22 +02:00
Fix NPE
This commit is contained in:
parent
b1108c8d73
commit
65adceff69
1 changed files with 6 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue