From 386b4006565f11517b902e586aee8b092f69254a Mon Sep 17 00:00:00 2001 From: LaurinTrp <75271441+LaurinTrp@users.noreply.github.com> Date: Tue, 27 Sep 2022 12:00:51 +0200 Subject: [PATCH] Closing two stream when importing an OBJ file --- src/main/kotlin/assimp/Importer.kt | 1 + src/main/kotlin/assimp/format/obj/ObjFileImporter.kt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main/kotlin/assimp/Importer.kt b/src/main/kotlin/assimp/Importer.kt index 702915d..0716fd3 100644 --- a/src/main/kotlin/assimp/Importer.kt +++ b/src/main/kotlin/assimp/Importer.kt @@ -300,6 +300,7 @@ constructor() { // Get file size for progress handler val fileSize = ioSystem.open(file).length.i + ioSystem.close() // Dispatch the reading to the worker class for this format val desc = imp.info diff --git a/src/main/kotlin/assimp/format/obj/ObjFileImporter.kt b/src/main/kotlin/assimp/format/obj/ObjFileImporter.kt index dce2e37..5de9d82 100644 --- a/src/main/kotlin/assimp/format/obj/ObjFileImporter.kt +++ b/src/main/kotlin/assimp/format/obj/ObjFileImporter.kt @@ -45,6 +45,8 @@ class ObjFileImporter : BaseImporter() { // And create the proper return structures out of it createDataFromImport(parser.model, scene, ioSystem) + + ioSystem.close() } /** Create the data from parsed obj-file */