Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-10-26 17:46:11 -0400
committerJeff Johnston2018-10-26 17:46:11 -0400
commit903109039312886e637a4599a67ffec3298ef64a (patch)
tree38dc2f07037a5b542adb8fe3b437b9c8d7ecc797
parent98c050098512f553073614dd5999592f1b84c4c5 (diff)
downloadorg.eclipse.cdt-903109039312886e637a4599a67ffec3298ef64a.tar.gz
org.eclipse.cdt-903109039312886e637a4599a67ffec3298ef64a.tar.xz
org.eclipse.cdt-903109039312886e637a4599a67ffec3298ef64a.zip
Bug 540523 - NullPointerException in MesonPropertyPage.performOk method
- add check that buildConfig field has been set before performing any activities on it Change-Id: If3ab7a0b20b54a9c16b26902c06b615e4c514ffa
-rw-r--r--build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java b/build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java
index ec01393702..8e4dea77e1 100644
--- a/build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java
+++ b/build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java
@@ -299,16 +299,18 @@ public class MesonPropertyPage extends PropertyPage {
return false;
}
} else {
- StringBuilder mesonargs = new StringBuilder();
- for (IMesonPropertyPageControl control : componentList) {
- if (!control.getUnconfiguredString().isEmpty()) {
- mesonargs.append(control.getUnconfiguredString());
- mesonargs.append(" "); //$NON-NLS-1$
+ if (buildConfig != null) {
+ StringBuilder mesonargs = new StringBuilder();
+ for (IMesonPropertyPageControl control : componentList) {
+ if (!control.getUnconfiguredString().isEmpty()) {
+ mesonargs.append(control.getUnconfiguredString());
+ mesonargs.append(" "); //$NON-NLS-1$
+ }
}
+ buildConfig.setProperty(IMesonConstants.MESON_ARGUMENTS, mesonargs.toString());
+ buildConfig.setProperty(IMesonConstants.MESON_ENV, envText.getText().trim());
+ buildConfig.setProperty(IMesonConstants.MESON_PROJECT_OPTIONS, projText.getText().trim());
}
- buildConfig.setProperty(IMesonConstants.MESON_ARGUMENTS, mesonargs.toString());
- buildConfig.setProperty(IMesonConstants.MESON_ENV, envText.getText().trim());
- buildConfig.setProperty(IMesonConstants.MESON_PROJECT_OPTIONS, projText.getText().trim());
}
return true;
}

Back to the top