Skip to content

Commit a1417cd

Browse files
committed
WinForms - Designer avoid calling Cef.Shutdown on Application.Exit
1 parent 4fef9ce commit a1417cd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CefSharp.WinForms/ChromiumWebBrowser.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,13 @@ protected override void OnHandleCreated(EventArgs e)
497497
{
498498
designMode = DesignMode;
499499

500-
if (!designMode)
500+
if(designMode)
501+
{
502+
//For design mode only we remove our custom ApplicationExit event handler
503+
//As we must avoid making all unmanaged calls
504+
Application.ApplicationExit -= OnApplicationExit;
505+
}
506+
else
501507
{
502508
InitializeFieldsAndCefIfRequired();
503509

0 commit comments

Comments
 (0)