Skip to content

Commit

Permalink
prevent crashing in finalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
danwalmsley committed Jan 20, 2020
1 parent 9fc7842 commit 1f1d3a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Shared/PlatformSupport/StandardRuntimePlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void DoDispose()
lock (_btlock)
Backtraces.Remove(_backtrace);
#endif
_plat.Free(_address, Size);
_plat?.Free(_address, Size);
GC.RemoveMemoryPressure(Size);
IsDisposed = true;
_address = IntPtr.Zero;
Expand Down

0 comments on commit 1f1d3a8

Please sign in to comment.