From 579bd6b13e1eac578f4300c7000f8ee861526bb8 Mon Sep 17 00:00:00 2001 From: Hector Piteau Date: Thu, 7 Jul 2022 17:11:58 +0900 Subject: [PATCH 1/4] Fix typo in installation instructions for ubuntu. --- Build.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build.md b/Build.md index f48f50495..d8e6c50f6 100644 --- a/Build.md +++ b/Build.md @@ -14,7 +14,7 @@ The assimp port in vcpkg is kept up to date by Microsoft team members and commun ## Install on Ubuntu You can install the Asset-Importer-Lib via apt: ``` -sudp apt-get update +sudo apt-get update sudo apt-get install libassimp-dev ``` From e254f80a3a6884f64895767b7a803853a5c585c6 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 8 Jul 2022 10:17:11 +0200 Subject: [PATCH 2/4] Fix memory leak in D3MFOpcPackage - closes https://github.com/assimp/assimp/issues/4628 --- code/AssetLib/3MF/D3MFOpcPackage.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/AssetLib/3MF/D3MFOpcPackage.cpp b/code/AssetLib/3MF/D3MFOpcPackage.cpp index f88039ae8..fea49a6bd 100644 --- a/code/AssetLib/3MF/D3MFOpcPackage.cpp +++ b/code/AssetLib/3MF/D3MFOpcPackage.cpp @@ -186,6 +186,9 @@ D3MFOpcPackage::D3MFOpcPackage(IOSystem *pIOHandler, const std::string &rFile) : D3MFOpcPackage::~D3MFOpcPackage() { mZipArchive->Close(mRootStream); delete mZipArchive; + for (auto tex : mEmbeddedTextures) { + delete mEmbeddedTextures[i]; + } } IOStream *D3MFOpcPackage::RootStream() const { From c5dfcac08a26c554494a22dc80620e716d929fdc Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 8 Jul 2022 10:25:40 +0200 Subject: [PATCH 3/4] Update D3MFOpcPackage.cpp --- code/AssetLib/3MF/D3MFOpcPackage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/3MF/D3MFOpcPackage.cpp b/code/AssetLib/3MF/D3MFOpcPackage.cpp index fea49a6bd..a2182dc29 100644 --- a/code/AssetLib/3MF/D3MFOpcPackage.cpp +++ b/code/AssetLib/3MF/D3MFOpcPackage.cpp @@ -187,7 +187,7 @@ D3MFOpcPackage::~D3MFOpcPackage() { mZipArchive->Close(mRootStream); delete mZipArchive; for (auto tex : mEmbeddedTextures) { - delete mEmbeddedTextures[i]; + delete tex; } } From 8e062792cd085d4023e5917cff35957b247506cf Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 Jul 2022 12:46:27 +0100 Subject: [PATCH 4/4] Build fix for compiling against minizip. --- code/Common/ZipArchiveIOSystem.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/Common/ZipArchiveIOSystem.cpp b/code/Common/ZipArchiveIOSystem.cpp index e0c9883d2..a29380838 100644 --- a/code/Common/ZipArchiveIOSystem.cpp +++ b/code/Common/ZipArchiveIOSystem.cpp @@ -196,7 +196,9 @@ zlib_filefunc_def IOSystem2Unzip::get(IOSystem *pIOHandler) { zlib_filefunc_def mapping; mapping.zopen_file = (open_file_func)open; +#ifdef _UNZ_H mapping.zopendisk_file = (opendisk_file_func)opendisk; +#endif mapping.zread_file = (read_file_func)read; mapping.zwrite_file = (write_file_func)write; mapping.ztell_file = (tell_file_func)tell;