Skip to content

Commit 563a414

Browse files
committed
guard against null python language home
1 parent 25344d2 commit 563a414

File tree

1 file changed

+1
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PythonCore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public static String getSysBasePrefix(TruffleLanguage.Env env) {
130130
String sysPrefix = env.getOptions().get(PythonOptions.SysBasePrefix);
131131
if (sysPrefix.isEmpty()) {
132132
String homePrefix = PythonLanguage.getCurrent().getHome();
133-
if (homePrefix.isEmpty()) {
133+
if (homePrefix == null || homePrefix.isEmpty()) {
134134
homePrefix = PREFIX;
135135
}
136136
env.getOptions().set(PythonOptions.SysBasePrefix, homePrefix);

0 commit comments

Comments
 (0)