From 128f1f1477d2f9a2f613283c94cbc4ae5b804962 Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 27 Jun 2015 14:30:20 +0400 Subject: [PATCH] (OgvAudio.TryOpen): don't dispose of intermediate stream. --- ArcFormats/AudioOGV.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/ArcFormats/AudioOGV.cs b/ArcFormats/AudioOGV.cs index 68ba03e8..79899712 100644 --- a/ArcFormats/AudioOGV.cs +++ b/ArcFormats/AudioOGV.cs @@ -52,15 +52,8 @@ namespace GameRes.Formats.ShiinaRio return null; var input = new StreamRegion (file, file.Position); - try - { - return new OggInput (input); - } - catch - { - input.Dispose(); - throw; - } + return new OggInput (input); + // input is left undisposed in case of exception. } } }