Skip to content

Commit

Permalink
Don't crash if we can't find an HwndSource for CefWpfWebBrowser
Browse files Browse the repository at this point in the history
CefWpfWebBrowser::Setup requires the HwndSource to be non-null.
  • Loading branch information
aroben committed Jul 2, 2012
1 parent 6ca5c84 commit 65a8b1f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CefSharp/CefWpfWebBrowser.cpp
Expand Up @@ -202,6 +202,11 @@ namespace CefSharp
}

HwndSource^ source = (HwndSource^)PresentationSource::FromVisual(parent);
if (source == nullptr)
{
return false;
}

Setup(source, "about:blank");
}

Expand Down

0 comments on commit 65a8b1f

Please sign in to comment.