Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2008-04-30 20:43:11 +0000
committerAlena Laskavaia2008-04-30 20:43:11 +0000
commit8143e89a59e093d570432e4bd36da82e1f6d12b7 (patch)
treeea41f780d9a0fc73f30bf5741f687c7eb6156d4e /build/org.eclipse.cdt.managedbuilder.gnu.ui/src
parent8d8ae63dbe4041dfa9de7c14f897b8ea4b3dd295 (diff)
downloadorg.eclipse.cdt-8143e89a59e093d570432e4bd36da82e1f6d12b7.tar.gz
org.eclipse.cdt-8143e89a59e093d570432e4bd36da82e1f6d12b7.tar.xz
org.eclipse.cdt-8143e89a59e093d570432e4bd36da82e1f6d12b7.zip
- fixed NPE on Linux
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.gnu.ui/src')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/mingw/MingwEnvironmentVariableSupplier.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/mingw/MingwEnvironmentVariableSupplier.java b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/mingw/MingwEnvironmentVariableSupplier.java
index 3c0ee110e6b..0be32484597 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/mingw/MingwEnvironmentVariableSupplier.java
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/mingw/MingwEnvironmentVariableSupplier.java
@@ -58,6 +58,7 @@ public class MingwEnvironmentVariableSupplier implements
private IBuildEnvironmentVariable path;
public static IPath getBinDir() {
+
IPath subPath = new Path("mingw\\bin");
// 1. Try the mingw directory in the platform install directory
IPath installPath = new Path(Platform.getInstallLocation().getURL().getFile());
@@ -71,7 +72,10 @@ public class MingwEnvironmentVariableSupplier implements
return binPath;
// 3. Try looking if the mingw installer ran
- String mingwPath = WindowsRegistry.getRegistry().getLocalMachineValue(
+ WindowsRegistry registry = WindowsRegistry.getRegistry();
+ if (registry==null) return null; // probably not even windows
+
+ String mingwPath = registry.getLocalMachineValue(
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW",
"InstallLocation");
if (mingwPath != null) {

Back to the top