Skip to content

Commit

Permalink
Fixed crash bug freeing unset handle.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomspilman committed Sep 22, 2024
1 parent 89a6e33 commit 494b2ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MonoGame.Framework/Platform/Native/Song.Native.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ private unsafe void PlatformInitialize(string fileName)

private unsafe void PlatformDispose(bool disposing)
{
_self.Free();
if (_self.IsAllocated)
_self.Free();

if (_song != null)
{
Expand Down

0 comments on commit 494b2ba

Please sign in to comment.