Skip to content

Commit f929914

Browse files
committed
Core - ManagedCefBrowserAdapter::CreateBrowser add missing UnWrap call
Add UnWrap call to allow for passing in CefSharp.WindowInfo (the wrapper object) Resolves #3399
1 parent 47a3fe1 commit f929914

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

CefSharp.Core.Runtime/ManagedCefBrowserAdapter.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ namespace CefSharp
2727

2828
void ManagedCefBrowserAdapter::CreateBrowser(IWindowInfo^ windowInfo, IBrowserSettings^ browserSettings, IRequestContext^ requestContext, String^ address)
2929
{
30-
auto cefWindowInfoWrapper = static_cast<WindowInfo^>(windowInfo);
31-
3230
CefString addressNative = StringUtils::ToNative(address);
3331

3432
if (browserSettings == nullptr)
@@ -90,10 +88,11 @@ namespace CefSharp
9088
auto managedRequestCtx = (RequestContext^)requestContext->UnWrap();
9189
requestCtx = static_cast<CefRefPtr<CefRequestContext>>(managedRequestCtx);
9290
}
93-
91+
92+
auto winInfo = (WindowInfo^)windowInfo->UnWrap();
9493
auto bSettings = (BrowserSettings^)browserSettings->UnWrap();
9594

96-
if (!CefBrowserHost::CreateBrowser(*cefWindowInfoWrapper->GetWindowInfo(), _clientAdapter.get(), addressNative,
95+
if (!CefBrowserHost::CreateBrowser(*winInfo->GetWindowInfo(), _clientAdapter.get(), addressNative,
9796
*bSettings->_browserSettings, extraInfo, requestCtx))
9897
{
9998
throw gcnew InvalidOperationException("CefBrowserHost::CreateBrowser call failed, review the CEF log file for more details.");

0 commit comments

Comments
 (0)