(VawAudio.TryOpen): don't dispose intermediate stream on error.

This commit is contained in:
morkt 2015-11-18 01:29:55 +04:00
parent 2b592c89f3
commit 2eea046139

View File

@ -74,17 +74,8 @@ namespace GameRes.Formats.BlackCyc
}
else
return null;
var input = new StreamRegion (file, offset, file.Length-offset, true);
try
{
var input = new StreamRegion (file, offset, file.Length-offset);
return format.TryOpen (input);
// FIXME file will be left undisposed
}
catch
{
input.Dispose();
throw;
}
}
public override void Write (SoundInput source, Stream output)