Skip to content

Commit 669970b

Browse files
timfelansalond
authored andcommitted
fix NPE
(cherry picked from commit 012a015)
1 parent 5bc6902 commit 669970b

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/Python3Core.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ private static String getScriptPath(Env env, String[] args) {
388388
String scriptPath;
389389
if (args.length > 0) {
390390
String argv0 = args[0];
391-
if (argv0 != null && !argv0.startsWith("-")) {
391+
if (argv0 != null && !argv0.startsWith("-") && !argv0.isEmpty()) {
392392
TruffleFile scriptFile = env.getTruffleFile(argv0);
393393
try {
394394
scriptPath = scriptFile.getAbsoluteFile().getParent().getPath();

0 commit comments

Comments
 (0)