Fix exceptional resource leak (CID50175)

This commit is contained in:
_aLfa_ 2014-09-25 18:33:21 +02:00
parent 8e63f14662
commit a614eb7b2e

View File

@ -702,11 +702,11 @@ namespace Nikse.SubtitleEdit.Forms
}
else
{
if (isMatroska)
if (isMatroska
&& (Path.GetExtension(fileName).Equals(".mkv", StringComparison.OrdinalIgnoreCase) || Path.GetExtension(fileName).Equals(".mks", StringComparison.OrdinalIgnoreCase)))
{
if (Path.GetExtension(fileName).Equals(".mkv", StringComparison.OrdinalIgnoreCase) || Path.GetExtension(fileName).Equals(".mks", StringComparison.OrdinalIgnoreCase))
using (var mkv = new Matroska())
{
Matroska mkv = new Matroska();
bool isValid = false;
bool hasConstantFrameRate = false;
double frameRate = 0;