mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 440057: Fix ClassCastException invoking C/C++ Project Settings Import Wizard.
This commit is contained in:
parent
099a88b980
commit
dc3a09bbce
1 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2008, 2014 IBM Corporation 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
|
||||
|
@ -35,8 +35,10 @@ public abstract class ProjectSettingsWizard extends Wizard {
|
|||
|
||||
// happens if the user invoked the wizard by right clicking on a project element
|
||||
if(selection != null) {
|
||||
IProject project = (IProject)selection.getFirstElement();
|
||||
mainPage.setInitialProject(project);
|
||||
final Object firstElement = selection.getFirstElement();
|
||||
if (firstElement instanceof IProject) {
|
||||
mainPage.setInitialProject((IProject)firstElement);
|
||||
}
|
||||
}
|
||||
|
||||
addPage(mainPage);
|
||||
|
|
Loading…
Add table
Reference in a new issue