Skip to content

Commit

Permalink
Avoid NPE if JRE is missing eclipse-pde#341
Browse files Browse the repository at this point in the history
JavaRuntime.getExecutionEnvironmentsManager().getEnvironment(execEnvID)
may return null
  • Loading branch information
EcljpseB0T committed Sep 23, 2022
1 parent 070c89a commit 1d73fff
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,9 @@ public static String querySystemPackages(IExecutionEnvironment environment) {
}

private static IVMInstall bestVmInstallFor(IExecutionEnvironment environment) {
if (environment == null) {
return null;
}
IVMInstall defaultVM = environment.getDefaultVM();
if (defaultVM != null) {
return defaultVM;
Expand Down

0 comments on commit 1d73fff

Please sign in to comment.