Commit c954cad1 authored by Martin Finkel's avatar Martin Finkel

Only reset libvlc dialogs if previously set

parent 5e8d54a7
......@@ -320,12 +320,12 @@ namespace LibVLCSharp.Shared
/// </summary>
public void UnsetDialogHandlers()
{
if (_dialogCbsPtr != IntPtr.Zero)
if (DialogHandlersSet)
{
Marshal.FreeHGlobal(_dialogCbsPtr);
_dialogCbsPtr = IntPtr.Zero;
Native.LibVLCDialogSetCallbacks(NativeReference, IntPtr.Zero, IntPtr.Zero);
}
Native.LibVLCDialogSetCallbacks(NativeReference, IntPtr.Zero, IntPtr.Zero);
}
/// <summary>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment