mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 20:52:44 +01:00
Optimize try/catch
This commit is contained in:
parent
595db02db8
commit
65f3f324b8
@ -253,16 +253,11 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
||||
{
|
||||
get
|
||||
{
|
||||
LibVlcDynamic vlc = new LibVlcDynamic();
|
||||
try
|
||||
using (var vlc = new LibVlcDynamic())
|
||||
{
|
||||
vlc.Initialize(null, null, null, null);
|
||||
return vlc.IsAllMethodsLoaded();
|
||||
}
|
||||
finally
|
||||
{
|
||||
vlc.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user