From f7e88dd67190dad55945d3991d8923dab936dbd6 Mon Sep 17 00:00:00 2001 From: Masc1989 <38345741+Masc1989@users.noreply.github.com> Date: Fri, 13 Apr 2018 10:03:00 +0200 Subject: [PATCH] Fixes crash when sector is null When releasing memory it can crash when the sector is null --- sources/OpenMcdf/CompoundFile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/OpenMcdf/CompoundFile.cs b/sources/OpenMcdf/CompoundFile.cs index 13928324..ad0024e3 100644 --- a/sources/OpenMcdf/CompoundFile.cs +++ b/sources/OpenMcdf/CompoundFile.cs @@ -550,7 +550,7 @@ public void Commit(bool releaseMemory) gap = true; } - if (releaseMemory) + if ( s != null && releaseMemory) { s.ReleaseData();