Skip to content

Commit cf2fae2

Browse files
committed
Fix assertion in PosixResources
1 parent 9ce7519 commit cf2fae2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,11 @@ private void dupFD(int fd1, int fd2) {
264264
ChannelWrapper channelWrapper = files.getOrDefault(fd1, null);
265265
String path = filePaths.get(fd1);
266266
if (channelWrapper != null) {
267-
assert path != null;
268267
channelWrapper.cnt += 1;
269268
files.put(fd2, channelWrapper);
270-
filePaths.put(fd2, path);
269+
if (path != null) {
270+
filePaths.put(fd2, path);
271+
}
271272
}
272273
}
273274

0 commit comments

Comments
 (0)