1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 02:36:01 +02:00

Check for null TargetPlatform

This commit is contained in:
Leo Treggiari 2005-05-23 20:32:31 +00:00
parent 9788d24ca4
commit ca05599a27

View file

@ -182,12 +182,14 @@ public class NewManagedProjectWizard extends NewCProjectWizard {
if (newConfigs.length > 0) { if (newConfigs.length > 0) {
IToolChain tc = newConfigs[0].getToolChain(); IToolChain tc = newConfigs[0].getToolChain();
ITargetPlatform targetPlatform = tc.getTargetPlatform(); ITargetPlatform targetPlatform = tc.getTargetPlatform();
if (targetPlatform != null) {
// Create entries for all binary parsers // Create entries for all binary parsers
String[] binaryParsers = targetPlatform.getBinaryParserList(); String[] binaryParsers = targetPlatform.getBinaryParserList();
for (int i=0; i<binaryParsers.length; i++) { for (int i=0; i<binaryParsers.length; i++) {
desc.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, binaryParsers[i]); desc.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, binaryParsers[i]);
} }
} }
}
} catch (CoreException e) { } catch (CoreException e) {
ManagedBuilderUIPlugin.log(e); ManagedBuilderUIPlugin.log(e);
} }