1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 09:37:12 +00:00

MediaInfo Dispose only when handle was created.

This commit is contained in:
Taloth Saldono 2015-06-27 01:01:53 +02:00
parent c9f720885e
commit c4430ab4de

View file

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