mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-13 16:54:13 +00:00
close input stream on cache hit
This commit is contained in:
1 parent
6eed99f030
commit
3d764c434c
1 file changed
+4
@@ -137,6 +137,10 @@ public final class TextureSubmapResource implements IResource {
|
||||
if (existing != null) {
|
||||
cells = existing;
|
||||
}
|
||||
} else {
|
||||
// generateCell and generateSubmap automatically close the stream, but we also need to close it on cache hit
|
||||
resource.getInputStream()
|
||||
.close();
|
||||
}
|
||||
|
||||
return cells[submap.cellX() * submap.rows() + submap.cellY()];
|
||||
|
||||
Reference in new issue
Block a user