mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 20:04:13 +08:00
(VawAudio.TryOpen): don't dispose intermediate stream on error.
This commit is contained in:
parent
2b592c89f3
commit
2eea046139
@ -74,17 +74,8 @@ namespace GameRes.Formats.BlackCyc
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
var input = new StreamRegion (file, offset, file.Length-offset, true);
|
var input = new StreamRegion (file, offset, file.Length-offset);
|
||||||
try
|
return format.TryOpen (input);
|
||||||
{
|
|
||||||
return format.TryOpen (input);
|
|
||||||
// FIXME file will be left undisposed
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
input.Dispose();
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Write (SoundInput source, Stream output)
|
public override void Write (SoundInput source, Stream output)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user