File tree 2 files changed +16
-2
lines changed
CefSharp.MinimalExample.WinForms
CefSharp.MinimalExample.Wpf
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,14 @@ public static int Main(string[] args)
38
38
settings . CefCommandLineArgs . Add ( "enable-usermedia-screen-capturing" ) ;
39
39
40
40
//Perform dependency check to make sure all relevant resources are in our output directory.
41
- Cef . Initialize ( settings , performDependencyCheck : true , browserProcessHandler : null ) ;
41
+ var initialized = Cef . Initialize ( settings , performDependencyCheck : true , browserProcessHandler : null ) ;
42
+
43
+ if ( ! initialized )
44
+ {
45
+ MessageBox . Show ( "Cef.Initialized failed, check the log file for more details." ) ;
46
+
47
+ return 0 ;
48
+ }
42
49
43
50
Application . EnableVisualStyles ( ) ;
44
51
Application . Run ( new BrowserForm ( ) ) ;
Original file line number Diff line number Diff line change @@ -37,7 +37,14 @@ public App()
37
37
if ( ! Cef . IsInitialized )
38
38
{
39
39
//Perform dependency check to make sure all relevant resources are in our output directory.
40
- Cef . Initialize ( settings , performDependencyCheck : true , browserProcessHandler : null ) ;
40
+ var initialized = Cef . Initialize ( settings , performDependencyCheck : true , browserProcessHandler : null ) ;
41
+
42
+ if ( ! initialized )
43
+ {
44
+ MessageBox . Show ( "Cef.Initialized failed, check the log file for more details." ) ;
45
+
46
+ Shutdown ( ) ;
47
+ }
41
48
}
42
49
}
43
50
}
You can’t perform that action at this time.
0 commit comments