Permalink
Browse files

Don't crash if we can't find an HwndSource for CefWpfWebBrowser

CefWpfWebBrowser::Setup requires the HwndSource to be non-null.
  • Loading branch information...
1 parent 6ca5c84 commit 65a8b1f92f0e6fdcfacfc2645d8ee8cf9672c185 @aroben aroben committed Jul 2, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 CefSharp/CefWpfWebBrowser.cpp
@@ -202,6 +202,11 @@ namespace CefSharp
}
HwndSource^ source = (HwndSource^)PresentationSource::FromVisual(parent);
+ if (source == nullptr)
+ {
+ return false;
+ }
+
Setup(source, "about:blank");
}

0 comments on commit 65a8b1f

Please sign in to comment.