aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Drawing/ImageStream.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2021-05-11 05:55:46 -0600
committerGitHub <noreply@github.com>2021-05-11 13:55:46 +0200
commite3f55a0c54a2517361c237543aba717fd2a16e69 (patch)
tree699391d1880b265db662388c7b5c4823b53623ea /MediaBrowser.Controller/Drawing/ImageStream.cs
parenta84e8c3884291acb721aeb202139372462e6c800 (diff)
Reduce warnings in MediaBrowser.Controller (#6006)
Co-authored-by: Patrick Barron <18354464+barronpm@users.noreply.github.com>
Diffstat (limited to 'MediaBrowser.Controller/Drawing/ImageStream.cs')
-rw-r--r--MediaBrowser.Controller/Drawing/ImageStream.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/Drawing/ImageStream.cs b/MediaBrowser.Controller/Drawing/ImageStream.cs
index 591cc53d1..5ee781ffa 100644
--- a/MediaBrowser.Controller/Drawing/ImageStream.cs
+++ b/MediaBrowser.Controller/Drawing/ImageStream.cs
@@ -22,9 +22,15 @@ namespace MediaBrowser.Controller.Drawing
public void Dispose()
{
- if (Stream != null)
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (disposing)
{
- Stream.Dispose();
+ Stream?.Dispose();
}
}
}