Skip to content

Commit bcf338f

Browse files
kkwpsvamaitland
authored andcommitted
WPF - Fix WpfIMEKeyboardHandler crash when browser is not initalized. (#3690)
GetBrowserHost will throw exception when browser is not initalized.
1 parent 734cb8f commit bcf338f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CefSharp.Wpf/Experimental/WpfIMEKeyboardHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ private IntPtr SourceHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, re
190190
{
191191
handled = false;
192192

193-
if (!isActive || !isSetup || owner == null || owner.IsDisposed || owner.GetBrowserHost() == null)
193+
if (!isActive || !isSetup || owner == null || owner.IsDisposed || !owner.IsBrowserInitialized || owner.GetBrowserHost() == null)
194194
{
195195
return IntPtr.Zero;
196196
}

0 commit comments

Comments
 (0)