Skip to content

Commit

Permalink
Fix set media may case carsh in win7
Browse files Browse the repository at this point in the history
  • Loading branch information
devkanro committed Nov 19, 2016
1 parent cd78288 commit 4702772
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Meta.Vlc/VlcMediaPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,14 @@ public VlcMedia Media
? null
: HandleManager.GetVlcObject(_getMediaFunction.Delegate(InstancePointer)) as VlcMedia;
}
set { _setMediaFunction.Delegate(InstancePointer, value == null ? IntPtr.Zero : value.InstancePointer); }
set
{
_setMediaFunction.Delegate(InstancePointer, IntPtr.Zero);
if (value != null)
{
_setMediaFunction.Delegate(InstancePointer, value.InstancePointer);
}
}
}

/// <summary>
Expand Down

0 comments on commit 4702772

Please sign in to comment.