mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +02:00
check if project is null in the constructor.
This commit is contained in:
parent
d4eb2d4416
commit
316cabcdd7
1 changed files with 9 additions and 7 deletions
|
@ -49,14 +49,16 @@ public class BinaryParserBlock implements IWizardTab {
|
|||
radios[i] = new String[] { exts[i].getLabel(), exts[i].getUniqueIdentifier()};
|
||||
}
|
||||
}
|
||||
try {
|
||||
ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(p);
|
||||
ICExtensionReference[] ref = desc.get(CCorePlugin.BINARY_PARSER_UNIQ_ID);
|
||||
if (ref.length > 0)
|
||||
id = ref[0].getID();
|
||||
if (project != null) {
|
||||
try {
|
||||
ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(p);
|
||||
ICExtensionReference[] ref = desc.get(CCorePlugin.BINARY_PARSER_UNIQ_ID);
|
||||
if (ref.length > 0)
|
||||
id = ref[0].getID();
|
||||
|
||||
} catch (CoreException e) {
|
||||
//e.printStackTrace();
|
||||
} catch (CoreException e) {
|
||||
//e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if (id == null) {
|
||||
id = CCorePlugin.getDefault().getPluginPreferences().getDefaultString(CCorePlugin.PREF_BINARY_PARSER);
|
||||
|
|
Loading…
Add table
Reference in a new issue