File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -673,8 +673,11 @@ private void InternalDispose(bool disposing)
673673 browser = null ;
674674
675675 // Incase we accidentally have a reference to the CEF drag data
676- currentDragData ? . Dispose ( ) ;
677- currentDragData = null ;
676+ if ( currentDragData != null )
677+ {
678+ currentDragData . Dispose ( ) ;
679+ currentDragData = null ;
680+ }
678681
679682 PresentationSource . RemoveSourceChangedHandler ( this , PresentationSourceChangedHandler ) ;
680683 // Release window event listeners if PresentationSourceChangedHandler event wasn't
@@ -712,18 +715,17 @@ private void InternalDispose(bool disposing)
712715 CleanupElement . Unloaded -= OnCleanupElementUnloaded ;
713716 }
714717
715- managedCefBrowserAdapter ? . Dispose ( ) ;
716- managedCefBrowserAdapter = null ;
718+ if ( managedCefBrowserAdapter != null )
719+ {
720+ managedCefBrowserAdapter . Dispose ( ) ;
721+ managedCefBrowserAdapter = null ;
722+ }
717723
718724 // LifeSpanHandler is set to null after managedCefBrowserAdapter.Dispose so ILifeSpanHandler.DoClose
719725 // is called.
720726 LifeSpanHandler = null ;
721727
722- WpfKeyboardHandler ? . Dispose ( ) ;
723- WpfKeyboardHandler = null ;
724-
725- RenderHandler ? . Dispose ( ) ;
726- RenderHandler = null ;
728+ WpfKeyboardHandler . Dispose ( ) ;
727729
728730 source = null ;
729731 }
You can’t perform that action at this time.
0 commit comments