From 27057de7eff609e6f77054042fde414cf2bbce75 Mon Sep 17 00:00:00 2001 From: Hajin Jang Date: Fri, 25 Oct 2019 23:26:00 +0900 Subject: [PATCH] Fix Wim.GlobalCleanup() crash SetPrintErrors(false) must be called before deallocating SetPrintErrorsPtr delegate. --- ManagedWimLib/ManagedWimLib.csproj | 6 ++---- ManagedWimLib/WimLibLoader.cs | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ManagedWimLib/ManagedWimLib.csproj b/ManagedWimLib/ManagedWimLib.csproj index a5fbc71..0a75eb2 100644 --- a/ManagedWimLib/ManagedWimLib.csproj +++ b/ManagedWimLib/ManagedWimLib.csproj @@ -5,7 +5,7 @@ ManagedWimLib ManagedWimLib latest - 1.4.1 + 1.4.2 Eric Biggers, Hajin Jang Joveler Native wimlib wrapper library for .Net. @@ -17,9 +17,7 @@ Supports Windows, Linux and macOS. images\Logo.png https://github.com/ied206/ManagedWimLib - (v1.4) Support macOS platform -- Fix Wim.GetErrors(), Wim.GetLastError() regression -- Fix Wim.RootPath, Wim.PathSeparator regression -- Error print state is now readable from Wim.ErrorPrintState +- Fix Wim.GlobalCleanup() crash wim wimlib dism imagex archive native pinvoke interop diff --git a/ManagedWimLib/WimLibLoader.cs b/ManagedWimLib/WimLibLoader.cs index 6d28cd9..554aa9e 100644 --- a/ManagedWimLib/WimLibLoader.cs +++ b/ManagedWimLib/WimLibLoader.cs @@ -353,6 +353,10 @@ protected override void LoadFunctions() protected override void ResetFunctions() { + #region (Code) Cleanup ErrorFile + SetPrintErrors(false); + #endregion + #region Global - GlobalInit, GlobalCleanup GlobalInit = null; GlobalCleanup = null; @@ -513,10 +517,6 @@ protected override void ResetFunctions() Utf8.Write = null; Overwrite = null; #endregion - - #region (Code) Cleanup ErrorFile - SetPrintErrors(false); - #endregion } #endregion