mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 313821: Intermittent NPE during shutdown, in source-not-found handling
This commit is contained in:
parent
233c76b736
commit
00d4f39a66
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006 Nokia and others.
|
* Copyright (c) 2006, 2010 Nokia and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -22,8 +22,9 @@ public class CSourceNotFoundEditorInput extends CommonSourceNotFoundEditorInput
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
if (getArtifact() instanceof CSourceNotFoundElement) {
|
Object artifact = getArtifact();
|
||||||
String description = ((CSourceNotFoundElement)getArtifact()).getDescription();
|
if (artifact instanceof CSourceNotFoundElement) {
|
||||||
|
String description = ((CSourceNotFoundElement)artifact).getDescription();
|
||||||
if (description != null) {
|
if (description != null) {
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue