Skip to content

Commit

Permalink
Fixes crash when sector is null
Browse files Browse the repository at this point in the history
When releasing memory it can crash when the sector is null
  • Loading branch information
Masc1989 authored Apr 13, 2018
1 parent 1ffb4e4 commit f7e88dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sources/OpenMcdf/CompoundFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ public void Commit(bool releaseMemory)
gap = true;
}

if (releaseMemory)
if ( s != null && releaseMemory)
{

s.ReleaseData();
Expand Down

0 comments on commit f7e88dd

Please sign in to comment.