Skip to content

Commit 64619a7

Browse files
committed
fix for iostream left open
1 parent 13b34a3 commit 64619a7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/src/processing/app/tools/CreateFont.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ public boolean accept(File dir, String name) {
131131
});
132132
for (File fontFile : items) {
133133
try {
134-
Font font = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream(fontFile));
134+
FileInputStream fis = new FileInputStream(fontFile);
135+
BufferedInputStream input = new BufferedInputStream(fis);
136+
Font font = Font.createFont(Font.TRUETYPE_FONT, input);
137+
input.close();
135138
fontList.add(font);
136139

137140
} catch (Exception e) {

0 commit comments

Comments
 (0)