MediaInfo Dispose only when handle was created.

pull/4/head
Taloth Saldono 10 years ago
parent c9f720885e
commit c4430ab4de

@ -73,12 +73,18 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
~MediaInfo()
{
MediaInfo_Delete(_handle);
if (_handle != IntPtr.Zero)
{
MediaInfo_Delete(_handle);
}
}
public void Dispose()
{
MediaInfo_Delete(_handle);
if (_handle != IntPtr.Zero)
{
MediaInfo_Delete(_handle);
}
GC.SuppressFinalize(this);
}

Loading…
Cancel
Save