diff --git a/core/src/main/java/com/seibel/distanthorizons/core/sql/dto/FullDataSourceV2DTO.java b/core/src/main/java/com/seibel/distanthorizons/core/sql/dto/FullDataSourceV2DTO.java index 7b53f86c4..3d4476161 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/sql/dto/FullDataSourceV2DTO.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/sql/dto/FullDataSourceV2DTO.java @@ -142,7 +142,16 @@ public class FullDataSourceV2DTO public FullDataSourceV2 createDataSource(@NotNull ILevelWrapper levelWrapper) throws IOException, InterruptedException, DataCorruptedException { FullDataSourceV2 dataSource = FullDataSourceV2.createEmpty(this.pos); - this.internalPopulateDataSource(dataSource, levelWrapper, false); + try + { + this.internalPopulateDataSource(dataSource, levelWrapper, false); + } + catch (Exception e) + { + dataSource.close(); + throw e; + } + return dataSource; }