File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -672,6 +672,18 @@ protected override void OnHandleCreated(EventArgs e)
672672 }
673673
674674 protected override void OnHandleDestroyed ( EventArgs e )
675+ {
676+ if ( ! designMode )
677+ {
678+ // NOTE: Had to move the code out of this function otherwise the designer would crash
679+ OnHandleDestroyedInternal ( ) ;
680+ }
681+
682+ base . OnHandleDestroyed ( e ) ;
683+ }
684+
685+ [ MethodImpl ( MethodImplOptions . NoInlining ) ]
686+ private void OnHandleDestroyedInternal ( )
675687 {
676688 //When the Control is being Recreated then we'll park
677689 //the browser (set to a temp parent) and assign to
@@ -686,8 +698,6 @@ protected override void OnHandleDestroyed(EventArgs e)
686698
687699 NativeMethodWrapper . SetWindowParent ( hwnd , parkingControl . Handle ) ;
688700 }
689-
690- base . OnHandleDestroyed ( e ) ;
691701 }
692702
693703 /// <summary>
You can’t perform that action at this time.
0 commit comments