mirror of
https://github.com/Lidarr/Lidarr
synced 2025-12-13 03:46:10 +01:00
MediaInfo Dispose only when handle was created.
This commit is contained in:
parent
c9f720885e
commit
c4430ab4de
1 changed files with 8 additions and 2 deletions
|
|
@ -73,12 +73,18 @@ public 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…
Reference in a new issue