1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 01:15:29 +02:00

Handle null "DisplayName" in registry

Fixes #330
This commit is contained in:
Jonah Graham 2023-03-19 14:34:33 -04:00
parent a6a4bfcf3b
commit 0dabaa15fb
2 changed files with 9 additions and 0 deletions

View file

@ -48,6 +48,9 @@ public class Msys2ToolChainProvider implements IToolChainProvider {
for (int i = 0; (subkey = registry.getCurrentUserKeyName(uninstallKey, i)) != null; i++) {
String compKey = uninstallKey + '\\' + subkey;
String displayName = registry.getCurrentUserValue(compKey, "DisplayName"); //$NON-NLS-1$
if (displayName == null) {
continue;
}
if (on64bit) {
if (MSYS2_64BIT_NAMES.contains(displayName)) {
if (addToolChain64(manager, registry, compKey)) {

View file

@ -95,6 +95,9 @@ public class MinGW {
for (int i = 0; (subkey = registry.getCurrentUserKeyName(uninstallKey, i)) != null; i++) {
String compKey = uninstallKey + '\\' + subkey;
String displayName = registry.getCurrentUserValue(compKey, "DisplayName"); //$NON-NLS-1$
if (displayName == null) {
continue;
}
if (on64bit) {
if (MSYS2_64BIT_NAMES.contains(displayName)) {
String installLocation = registry.getCurrentUserValue(compKey, "InstallLocation"); //$NON-NLS-1$
@ -230,6 +233,9 @@ public class MinGW {
for (int i = 0; (subkey = registry.getCurrentUserKeyName(uninstallKey, i)) != null; i++) {
String compKey = uninstallKey + '\\' + subkey;
String displayName = registry.getCurrentUserValue(compKey, "DisplayName"); //$NON-NLS-1$
if (displayName == null) {
continue;
}
if (on64bit) {
if (MSYS2_64BIT_NAMES.contains(displayName)) {
String home = registry.getCurrentUserValue(compKey, "InstallLocation"); //$NON-NLS-1$