From b1fc28838bdb40a9a7c8c77b960cc2c82262b1e8 Mon Sep 17 00:00:00 2001 From: sr55 Date: Tue, 8 Oct 2013 20:02:41 +0000 Subject: WinGui: Handle libhb dll errors. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5825 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'win/CS/HandBrakeWPF/ViewModels') diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 33403b5b3..681a73ed6 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -1166,7 +1166,21 @@ namespace HandBrakeWPF.ViewModels width = 720; } - return HandBrakeUtils.CreateX264OptionsString(preset, tunes, this.ExtraArguments, profile, this.H264Level, width, height); + try + { + return HandBrakeUtils.CreateX264OptionsString( + preset, + tunes, + this.ExtraArguments, + profile, + this.H264Level, + width, + height); + } + catch (Exception) + { + return "Error: Libhb not loaded."; + } } /// -- cgit v1.2.3