Avoid second exception when closing external decoder that failed to start

This commit is contained in:
Grigory Chudov
2013-03-25 00:29:35 -04:00
parent 19ffb4808d
commit c0c9b17391

View File

@@ -85,7 +85,10 @@ namespace CUETools.Codecs
ex = _ex;
}
if (!started)
{
_decoderProcess = null;
throw new Exception(_decoder + ": " + (ex == null ? "please check the path" : ex.Message));
}
rdr = new WAVReader(_path, _decoderProcess.StandardOutput.BaseStream);
}