Skip to main content
summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorJeff Johnston2018-10-26 17:46:11 -0400
committerJeff Johnston2018-10-29 18:36:03 -0400
commit26bdf7e82fdd7a220de493edb7bff06f7710a54e (patch)
tree10353da2ea5da8548dc9027585b10cde108ababe /build
parent08721bdf8e27cc461ae9dd2dfaa2216ddd46334e (diff)
downloadorg.eclipse.cdt-26bdf7e82fdd7a220de493edb7bff06f7710a54e.tar.gz
org.eclipse.cdt-26bdf7e82fdd7a220de493edb7bff06f7710a54e.tar.xz
org.eclipse.cdt-26bdf7e82fdd7a220de493edb7bff06f7710a54e.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 (cherry picked from commit 903109039312886e637a4599a67ffec3298ef64a)
Diffstat (limited to 'build')
-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