1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 300011 - NPE in XLCompilerPropertiesPage

This commit is contained in:
Vivian Kong 2010-01-19 15:47:08 +00:00
parent f068e6da17
commit 0991ca6fd9
2 changed files with 12 additions and 8 deletions

View file

@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2007, 2009 IBM Corporation and others.
# Copyright (c) 2007, 2010 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
@ -9,8 +9,8 @@
# IBM Corporation - initial API and implementation
###############################################################################
XLCompiler_v8=8.0
XLCompiler_v9=9.0
XLCompiler_v8=v8.0
XLCompiler_v9=v9.0
XLCompiler_v10=v10.1
XLCompilerPreferencePage_0=XL C/C++ Compiler Preferences
XLCompilerPreferencePage_1=Compiler Root Path:

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007, 2009 IBM Corporation and others.
* Copyright (c) 2007, 2010 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
@ -157,10 +157,14 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
project.setPersistentProperty(new QualifiedName("", //$NON-NLS-1$
PreferenceConstants.P_XL_COMPILER_ROOT), fPathEditor
.getStringValue());
String version = PreferenceConstants.getVersion(fVersionEditor.getSelection());
project.setPersistentProperty(new QualifiedName("", //$NON-NLS-1$
PreferenceConstants.P_XLC_COMPILER_VERSION), version);
String version = null;
if (fVersionEditor.getSelection() != null) {
version = PreferenceConstants.getVersion(fVersionEditor.getSelection());
project.setPersistentProperty(new QualifiedName("", //$NON-NLS-1$
PreferenceConstants.P_XLC_COMPILER_VERSION), version);
}
} catch (CoreException e) {
return false;
}